CI Gitlab Pages (deploy later)

This commit is contained in:
JosephK 2018-02-28 16:45:53 +01:00
parent ea0803e22b
commit 06b09cd270

View file

@ -1,7 +1,7 @@
image: hatsoftwares/hugo-vnu:latest image: hatsoftwares/hugo-vnu:latest
stages: stages:
- validity-check - validity-check
- deploy - pages
validity-check: validity-check:
stage: validity-check stage: validity-check
@ -19,3 +19,15 @@ deploy:
- 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 - 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: only:
- master - master
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- master