~gpanders/gpanders.com

0a2133e7fe379bb5a7b076046f363cc12f238964 — Gregory Anders 5 months ago 9fe33e7
Mirror to GitHub
1 files changed, 6 insertions(+), 23 deletions(-)

M .build.yml
M .build.yml => .build.yml +6 -23
@@ 1,26 1,9 @@
image: nixos/unstable
packages:
  - nixos.hugo
  - nixos.zip
  - nixos.curl
image: alpine/latest
secrets:
  - b8cb4b17-4157-4870-9b81-10a3fa0d7b91
triggers:
  - action: email
    condition: failure
    to: Gregory Anders <greg@gpanders.com>
  - 78f39fb6-1185-492f-9c21-f755e10b5e5d  # ssh key
environment:
  GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
tasks:
  - build: |
  - mirror: |
      cd gpanders.com
      hugo --minify
      zip site.zip netlify.toml
      cd public
      zip -r ../site.zip .
  - deploy: |
      set +x
      . ~/.env
      curl -H 'Content-Type: application/zip' \
           -H "Authorization: Bearer $TOKEN" \
           --data-binary "@gpanders.com/site.zip" \
           https://api.netlify.com/api/v1/sites/$SITE/deploys >/dev/null
      set -x
      git push --mirror git@github.com:gpanders/gpanders.com