line-and-surface/.gitlab-ci.yml

26 lines
523 B
YAML
Raw Normal View History

2021-01-10 12:35:05 +01:00
stages:
- build
- deploy
2021-01-09 21:53:06 +01:00
build site:
image: node:lts
stage: build
script:
- cd app
- npm install --progress=false
- npm run build
artifacts:
paths:
2021-01-09 21:56:22 +01:00
- app/dist
2021-01-10 12:35:05 +01:00
deploy site:
image: instrumentisto/rsync-ssh
stage: deploy
script:
- mkdir ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- rsync -vr -e "ssh -p ${SSH_PORT}" app/dist/ "${DEPLOY_DEST}"