1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

CI: deploy website to multiple locations

Create a quick shell script that can deploy to localhost, my tilde
(staging), or seirdy.one.
This commit is contained in:
rohan kumar 2020-11-03 19:52:42 -08:00
parent beb174c66b
commit 6c4c58886a
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 29 additions and 7 deletions

View file

@ -18,6 +18,4 @@ tasks:
- upload: | - upload: |
cd seirdy.one cd seirdy.one
echo "StrictHostKeyChecking=no" >> ~/.ssh/config echo "StrictHostKeyChecking=no" >> ~/.ssh/config
rsync -rvzP --exclude "public/gemini" --exclude "*.gmi" public/ deploy@seirdy.one:/var/www/seirdy.one/ sh ./deploy.sh seirdy.one
rsync -rvzP --exclude "*.html" public/gemini/ public/about public/posts deploy@seirdy.one:/srv/gemini/seirdy.one/
rsync -rvzP public/posts/gemini/index.xml deploy@seirdy.one:/srv/gemini/seirdy.one/feed.xml

View file

@ -4,7 +4,7 @@ It me!
See the Director's Cut of my bio in the "about" page: See the Director's Cut of my bio in the "about" page:
=> /about/ About me => about/ About me
Git repos: Git repos:

View file

@ -16,8 +16,6 @@ More info about the Tildeverse:
=> http://tilde.club/%7Epfhawkins/othertildes.html Pick a tilde => http://tilde.club/%7Epfhawkins/othertildes.html Pick a tilde
=> http://tilde.club/%7Eanthonydpaul/primer.html Get started => http://tilde.club/%7Eanthonydpaul/primer.html Get started
Content on this site also appears on my Gemini space (TODO: link it).
## Location (Rohan, meatspace) ## Location (Rohan, meatspace)
Currently living at home in Cupertino, CA Currently living at home in Cupertino, CA

View file

@ -21,7 +21,7 @@ tilde](http://tilde.club/%7Epfhawkins/othertildes.html) and [get
started](http://tilde.club/~anthonydpaul/primer.html). My Tildeverse pages will serve started](http://tilde.club/~anthonydpaul/primer.html). My Tildeverse pages will serve
as a "rough draft". as a "rough draft".
Content on this site also appears on my Gemini space (TODO: link it). Content on this site also appears on [my Gemini space](gemini://seirdy.one)
Location (Rohan, meatspace) Location (Rohan, meatspace)
--------------------------- ---------------------------

26
deploy.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh
case "$1" in
seirdy.one)
login='deploy@seirdy.one' # user@host
www_prefix="$login:/var/www/seirdy.one"
gemini_prefix="$login:/srv/gemini/seirdy.one"
;;
envs.net)
login='seirdy@envs.net'
www_prefix="$login:/home/seirdy/public_html"
gemini_prefix="$login:/home/seirdy/public_gemini"
;;
localhost)
gemini_prefix='/tmp/gemini/serve/seirdy.one'
;;
*)
echo 'must supply hostname' >&2
exit 1
;;
esac
[ "$1" != 'localhost' ] \
&& rsync -rvzP --exclude "public/gemini" --exclude "*.gmi" public/ "$www_prefix/"
rsync -rvzP --exclude "*.html" public/gemini/ public/about public/posts "$gemini_prefix/"
rsync -rvzP public/posts/gemini/index.xml "$gemini_prefix/feed.xml"