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 :
2018-03-21 07:04:22 +00:00
- hugo --config=config.toml,`ls config/*toml | paste -sd "," -`
2018-02-28 15:33:36 +00:00
- 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-21 07:04:22 +00:00
- hugo --config=config.toml,`ls config/*toml | paste -sd "," -` -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-03-21 07:04:22 +00:00
trads :
stage : deploy
image : framasoft/push-trad:latest
script :
2018-06-21 06:45:44 +00:00
- sed -e "s@<project-version>.*</project-version>@<project-version>$CI_COMMIT_REF_SLUG</project-version>@" -i zanata.xml
2018-03-21 07:04:22 +00:00
- if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini; fi
- if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make push-locales; fi
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 07:04:22 +00:00
- hugo --config=config.toml,`ls config/*toml | paste -sd "," -` -b "https://$GITLAB_USER_LOGIN.frama.io/$CI_PROJECT_NAME/"
2018-03-21 12:24:15 +00:00
- rm public/js/pathnamereplace.js
2018-02-28 15:45:53 +00:00
artifacts :
paths :
- public