From bd1e20e61e3dae7286f9b6bf292dc4872a9335b0 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Fri, 24 Sep 2021 10:14:57 +0200 Subject: [PATCH] Added deploy to the gitbal-ci configuration Signed-off-by: Louis Vallat --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) 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;"