Add deployment via GitLab CI
This commit is contained in:
parent
18e43839d1
commit
982f1ef026
1 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
build site:
|
build site:
|
||||||
image: node:lts
|
image: node:lts
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -8,3 +12,14 @@ build site:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- app/dist
|
- 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}"
|
||||||
|
|
Loading…
Reference in a new issue