From fdb8e8d3020837e54450951d6fd0528a40ebe2a0 Mon Sep 17 00:00:00 2001 From: JosephK Date: Wed, 28 Feb 2018 16:55:41 +0100 Subject: [PATCH] Pff --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d026cb3..44a1299 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,9 +9,21 @@ validity-check: - hugo - find public -name index.html | xargs java -jar /opt/dist/vnu.jar +deploy: + stage: deploy + script: + - hugo + - mkdir "${HOME}/.ssh" + - chmod 700 "${HOME}/.ssh" + - echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts + - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then echo -e "${DEPLOYEMENT_KEY}" > key; chmod 600 key; rsync -e "ssh -i key" -a --delete --exclude='stats' --exclude='.htaccess' public/ ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/; rm key; fi + only: + - master + pages: stage: deploy script: + - hugo - mkdir .public - cp -r * .public - mv .public public