From b09b4e2ef6d93bb5984dce50bd3f6c5cbe683e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Mon, 20 Nov 2023 13:45:34 +0100 Subject: [PATCH] Update SSH keyscan command to include SSH port --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e815ee..0f9256c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,16 +20,16 @@ deploy-job: - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh - - ssh-keyscan $SSH_IP >> ~/.ssh/known_hosts + - ssh-keyscan -p $SSH_PORT $SSH_IP >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts script: - - ssh $SSH_USER@$SSH_IP " + - ssh -p $SSH_PORT $SSH_USER@$SSH_IP " . ~/.zshrc && cd /home/ewilan/www/$CI_PROJECT_NAME && git pull && /home/ewilan/.nvm/versions/node/v$NODE_VERSION/bin/pnpm i && /home/ewilan/.nvm/versions/node/v$NODE_VERSION/bin/pnpm build && pm2 restart $PM2 && - notify main '$CI_PROJECT_TITLE deployed'" + notify discord '$CI_PROJECT_TITLE deployed'" only: - main