17 lines
No EOL
464 B
YAML
17 lines
No EOL
464 B
YAML
before_script:
|
|
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
|
|
- eval $(ssh-agent -s)
|
|
- echo -n "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' | ssh-add -
|
|
- mkdir -p ~/.ssh
|
|
- chmod 700 ~/.ssh
|
|
- ssh-keyscan "$SSH_SERVER_HOSTKEYS" >> ~/.ssh/known_hosts
|
|
- chmod 644 ~/.ssh/known_hosts
|
|
|
|
|
|
|
|
deploy:
|
|
script:
|
|
- echo "STARTING DEPLOYING"
|
|
- ssh $HOST "bash $SCRIPT_PATH" > /dev/null
|
|
only:
|
|
- master |