From ab34923167bde9dd34a3a56e08ad9d0d752c62bc Mon Sep 17 00:00:00 2001 From: James McDonald Date: Thu, 7 Feb 2019 18:09:19 +0100 Subject: [PATCH] Add new test --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 80d27b9..d116479 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,11 +12,17 @@ before_script: - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts -deploy: +Run hugo test: + script: + - hugo + except: + - master + +Deploy site: script: - hugo - rsync -av --delete --exclude presentations public/ james@shee.sh:/srv/www/jamesmcdonald - echo "Purging CloudFlare cache" - - 'curl -X POST "https://api.cloudflare.com/client/v4/zones/8f213feeb6709de2ba2b70dd5cfa704e/purge_cache" -H "X-Auth-Email: $CLOUDFLARE_EMAIL" -H "X-Auth-Key: $CLOUDFLARE_KEY" -H "Content-Type: application/json" --data "{\"purge_everything\": true}"' + - 'curl -s -X POST "https://api.cloudflare.com/client/v4/zones/8f213feeb6709de2ba2b70dd5cfa704e/purge_cache" -H "X-Auth-Email: $CLOUDFLARE_EMAIL" -H "X-Auth-Key: $CLOUDFLARE_KEY" -H "Content-Type: application/json" --data "{\"purge_everything\": true}"' only: - master