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:
|
2019-11-08 13:18:04 +00:00
|
|
|
- yarn install --pure-lockfile
|
|
|
|
- npm run build
|
|
|
|
- rm -r public/ && mv dist/ public/
|
2018-09-21 21:00:42 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-11-08 13:18:04 +00:00
|
|
|
- public
|
2018-09-21 21:00:42 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- node_modules/
|
2018-02-28 15:33:36 +00:00
|
|
|
|
2019-11-08 13:18:04 +00:00
|
|
|
production:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- yarn install --pure-lockfile
|
|
|
|
- npm run build
|
|
|
|
- rm -r public/ && mv dist/ public/
|
|
|
|
- mkdir "${HOME}/.ssh"
|
|
|
|
- chmod 700 "${HOME}/.ssh"
|
|
|
|
- echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts;
|
|
|
|
- eval `ssh-agent -s`
|
|
|
|
- ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i);
|
|
|
|
- cd public && echo "put -r ." | sftp ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web;
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
variables:
|
|
|
|
- $DEPLOYEMENT_KEY
|
|
|
|
- $DEPLOYEMENT_KNOWN_HOSTS
|
|
|
|
- $DEPLOYEMENT_USER
|
|
|
|
- $DEPLOYEMENT_HOST
|