Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Update SSH keyscan command to include SSH port
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilan-riviere committed Nov 20, 2023
1 parent 5633370 commit b09b4e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b09b4e2

Please sign in to comment.