From f9a0760178c7d0d4d5ee4a91eab29a153108b091 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Sat, 9 Jul 2022 22:18:51 -0400 Subject: [PATCH] Add deploy script --- .build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .build.yml diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..a3d3beb --- /dev/null +++ b/.build.yml @@ -0,0 +1,23 @@ +image: openbsd/latest +packages: + - zola +sources: + - https://git.sr.ht/~nickzana/blog +secrets: + - 55035670-fa32-4d43-ae48-6cb4651224b8 +environment: + deploy: public@nickzana.dev:/ +tasks: + - build: | + cd blog + zola build + - deploy: | + cd blog + # only deploy when on master branch + if [ "$(git rev-parse --abbrev-ref HEAD)" == "master" ]; then + sshopts="ssh -p 221 -o StrictHostKeyChecking=no" + openrsync --rsh="$sshopts" --delete -r public $deploy + else + echo "Skipping: not on master branch" + complete-build; + fi