From 2229e2ac05ced955c904a284bbc6a333b59040b2 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 14 Aug 2019 00:51:17 +0200 Subject: [PATCH] Remove stray artifacts from previous builds --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd2436b..6bfe989 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,6 +20,7 @@ build_pages: expire_in: "1 week" untracked: true script: + - rm -rf public/* - apk add --no-cache --upgrade hugo - hugo $(cat .hugo-params) @@ -53,7 +54,7 @@ deploy_staging: - eval $(ssh-agent -s) - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - echo "$PRIVATE_KEY" | ssh-add - - - rsync -e "ssh -l deploy -p 31337" -av public/ 195.54.164.87:staging + - rsync -e "ssh -l deploy -p 31337" -av --delete public/ 195.54.164.87:staging when: on_success environment: name: staging @@ -78,7 +79,7 @@ deploy_production: - eval $(ssh-agent -s) - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - echo "$PRIVATE_KEY" | ssh-add - - - rsync -e "ssh -l deploy -p 31337" -av public/ 195.54.164.87:production + - rsync -e "ssh -l deploy -p 31337" -av --delete public/ 195.54.164.87:production when: on_success environment: name: production