mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12: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:
parent
beb174c66b
commit
6c4c58886a
5 changed files with 29 additions and 7 deletions
|
@ -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
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
26
deploy.sh
Executable 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"
|
Loading…
Reference in a new issue