Add CI deployment job

This commit is contained in:
timvisee 2019-07-03 19:09:26 +02:00
parent a5b937e520
commit ea4560ac61
No known key found for this signature in database
GPG Key ID: B8DB720BC383E172
1 changed files with 13 additions and 7 deletions

View File

@ -16,10 +16,16 @@ build:
paths:
- public
# TODO: job to move deployment files
# deploy:
# script: []
# dependencies:
# - build
# only:
# - deploy
deploy:
image: alpine:latest
script:
- apk add openssh sshpass
- sshpass -p '$DEPLOY_SSH_PASS' ssh $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST "rm -rf /var/customers/webs/timvisee/timvisee.com/*"
- sshpass -p '$DEPLOY_SSH_PASS' scp public/* $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST:
dependencies:
- build
environment:
name: production
url: https://timvisee.com/
only:
- deploy