diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a96af4..85f15e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,4 +28,15 @@ release-master: only: - master +deploy: + stage: deploy + before_script: + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + script: + - ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SSH_DESTINATION "cd $PATH_TO_APPLICATION; $UPGRADE_COMMAND;" + only: + - master