joinpeertube/.gitlab-ci.yml

45 lines
1.4 KiB
YAML
Raw Normal View History

2018-09-21 21:00:42 +00:00
image: framasoft/vuefs:latest
2018-02-28 15:33:36 +00:00
stages:
2018-02-28 15:52:25 +00:00
- deploy
2018-02-28 15:33:36 +00:00
2018-09-21 21:00:42 +00:00
pages:
stage: deploy
2018-02-28 15:33:36 +00:00
script:
2018-09-21 21:00:42 +00:00
- npm install
- npm run preview
- mv -f public/$CI_PROJECT_NAME/* public
artifacts:
paths:
- public
cache:
paths:
- node_modules/
2018-02-28 15:33:36 +00:00
2018-09-21 21:00:42 +00:00
production:
2018-02-28 15:55:41 +00:00
stage: deploy
script:
2018-09-21 21:00:42 +00:00
- npm install
- npm run prod
- cp ./public/fr/index.html ./public/index.html
- mkdir "${HOME}/.ssh"
- chmod 700 "${HOME}/.ssh"
- 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 -i); fi
- if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then echo "put -r public/* ${DEPLOYEMENT_USER}/" | sftp ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}; fi
2018-02-28 15:55:41 +00:00
only:
- master
2018-09-21 21:00:42 +00:00
# Push new translations strings to https://trad.framasoft.org
2018-03-21 07:04:22 +00:00
trads:
stage: deploy
image: framasoft/push-trad:latest
script:
2018-09-21 21:00:42 +00:00
- sed -e "s@<project-version>.*</project-version>@<project-version>$CI_COMMIT_REF_SLUG</project-version>@" -i zanata/zanata.xml
2018-09-25 10:54:01 +00:00
- sed -e "s@<project>.*</project>@<project>join-peertube</project>@" -i zanata/zanata.xml
2018-09-21 21:00:42 +00:00
- cp zanata/zanata.xml 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