Update .gitlab-ci.yml

This commit is contained in:
Daniel Løvbrøtte Olsen 2019-05-23 19:03:09 +00:00
parent 4f08f8a340
commit 5cfe1b23f1
1 changed files with 4 additions and 2 deletions

View File

@ -17,7 +17,9 @@ build:
deploy:
stage: deploy
script:
- 'which ssh-agent || ( apk add --no-cache zip openssh-client )'
- 'which ssh-agent || ( apk add --no-cache openssh-client )'
- apk add --no-cache rsync
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
@ -25,4 +27,4 @@ deploy:
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- ssh "$SERVER_HOST" ls "$WPD_FOLDER"
- rsync --dry-run -avz "$SERVER_HOST" out/ "$WPD_FOLDER"