fix(ci): add missing ssh authentication

This commit is contained in:
curben 2020-04-20 10:05:03 +01:00
parent bc370a98ec
commit f51a8ce388
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,13 @@ deploy_job:
before_script:
- 'which ssh-agent || (apk update && apk add curl openssh-client git grep)'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- echo "$GH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- sh script.sh