From c38a07d1e401397daf95373a0031e8a30cab68ee Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Wed, 8 Nov 2017 01:39:14 +0100 Subject: [PATCH] Fix build script to first clean the old files from the production environment. --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a38e88b..2391918 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,6 +68,7 @@ production: script: - if [[ -z "${WWW_DEPLOY_ROOT_PRODUCTION}" ]] ; then echo "WWW_DEPLOY_ROOT_PRODUCTION is not set" ; exit 1 ; fi - if [[ ! -d "${WWW_DEPLOY_ROOT_PRODUCTION}" ]] ; then mkdir -p "${WWW_DEPLOY_ROOT_PRODUCTION}" || die "Failed to create target directory for deployment!" ; fi + - rm -rf "${WWW_DEPLOY_ROOT_PRODUCTION}"/* || die "Failed to clean old deployment" - cp -r dist/* "${WWW_DEPLOY_ROOT_PRODUCTION}" cleanup_job: