~joram/joram.io

6f8924e6c5f5db70066e48054378b8ce01186675 — Joram Schrijver 1 year, 3 months ago 397a92c builds-test
Add .build.yml
1 files changed, 44 insertions(+), 0 deletions(-)

A .build.yml
A .build.yml => .build.yml +44 -0
@@ 0,0 1,44 @@
image: alpine/edge
packages:
  - make
  - sbcl
  - pandoc-cli
  - rsync
sources:
  - https://git.sr.ht/~joram/joram.io
secrets:
  - 9c23cb38-c8ca-4fed-b7b4-88d24e11a10c
environment:
  sshconfig: |
    StrictHostKeyChecking no

    Host deploy
      User deploy
      Hostname kestral.joram.io
      Port 2222
triggers:
  - action: email
    condition: always
    to: builds@joram.io
tasks:
  - install-quicklisp: |
      wget https://beta.quicklisp.org/quicklisp.lisp
      sbcl --non-interactive \
           --load quicklisp.lisp \
           --eval '(quicklisp-quickstart:install)' \
           --eval '(ql-util:without-prompting (ql:add-to-init-file))' \
           --quit
  - generate: |
      cd joram.io
      make
  - check-deploy: |
      cd joram.io
      if [ "$(git rev-parse origin/master)" != "$(git rev-parse HEAD)" ]; then
        echo "Not deploying because not on master branch"
        complete-build
      fi
  - deploy: |
      cd joram.io
      echo "$sshconfig" >> ~/.ssh/config
      rsync -rP --delete --delete-excluded \
            _site/ deploy:joram.io/