diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8bf0486..80fead8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,3 +33,12 @@ 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;"