joinpeertube/.gitlab-ci.yml

35 lines
995 B
YAML
Raw Normal View History

2018-02-28 15:33:36 +00:00
image: hatsoftwares/hugo-vnu:latest
stages:
- validity-check
2018-02-28 15:52:25 +00:00
- deploy
2018-02-28 15:33:36 +00:00
validity-check:
stage: validity-check
script:
- hugo
- find public -name index.html | xargs java -jar /opt/dist/vnu.jar
2018-02-28 15:55:41 +00:00
deploy:
stage: deploy
script:
2018-03-01 11:11:25 +00:00
- hugo -b "https://joinpeertube.org"
2018-02-28 15:55:41 +00:00
- mkdir "${HOME}/.ssh"
- chmod 700 "${HOME}/.ssh"
2018-03-01 11:04:19 +00:00
- if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
- eval `ssh-agent -s`
- if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "$DEPLOYEMENT_KEY" | base64 --decode); fi
- if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then rsync -a --delete --exclude='stats' --exclude='error' --exclude='.htaccess' public/ ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/; fi
2018-02-28 15:55:41 +00:00
only:
- master
2018-02-28 15:45:53 +00:00
pages:
2018-02-28 15:52:25 +00:00
stage: deploy
2018-02-28 15:45:53 +00:00
script:
2018-03-21 12:24:15 +00:00
- hugo -b "https://$GITLAB_USER_LOGIN.frama.io/$CI_PROJECT_NAME/"
- rm public/js/pathnamereplace.js
2018-02-28 15:45:53 +00:00
artifacts:
paths:
- public
only:
- master