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