Add deployment via GitLab CI

This commit is contained in:
Tomáš Mládek 2021-01-10 12:35:05 +01:00
parent 18e43839d1
commit 982f1ef026

View file

@ -1,3 +1,7 @@
stages:
- build
- deploy
build site:
image: node:lts
stage: build
@ -8,3 +12,14 @@ build site:
artifacts:
paths:
- app/dist
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}"