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