CI Gitlab Pages (deploy later)

This commit is contained in:
JosephK 2018-02-28 16:52:25 +01:00
parent 0c03843deb
commit aaffdf2f7d

View file

@ -1,7 +1,7 @@
image: hatsoftwares/hugo-vnu:latest
stages:
- validity-check
- pages
- deploy
validity-check:
stage: validity-check
@ -9,19 +9,8 @@ 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: pages
stage: deploy
script:
- mkdir .public
- cp -r * .public