blob: a4ac63d85f1f7a905b3552a141577680c5214448 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
image: debian/stretch
packages:
- jekyll
sources:
- https://git.sr.ht/~nloomans/noahloomans.com
environment:
deploy: root@noahloomans.com
secrets:
- a453c7e5-f773-4343-9fe3-ba3bf58492a3
tasks:
- build: |
cd noahloomans.com
jekyll build
- deploy: |
cd noahloomans.com
# We only want to deploy when on master. We cain't just check if
# --abbrev-ref is master since the HEAD is detached.
if [ "$(git rev-parse master)" = "$(git rev-parse HEAD)" ]; then
rsync \
--rsh='ssh -o StrictHostKeyChecking=no' \
--delete \
--recursive \
--progress \
_site/. $deploy:/var/www/noahloomans.com/html/
else
echo "Not on master, skipping..."
fi
|