Skip to content

Commit

Permalink
Add SSH configuration to deploy-job
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilan-riviere committed Nov 20, 2023
1 parent 898ac5c commit 102ddd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ deploy-job:
- chmod 700 ~/.ssh
- ssh-keyscan -p $SSH_PORT $SSH_IP >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- echo "Host host" >> ~/.ssh/config
- echo " Port $SSH_PORT" >> ~/.ssh/config
- echo "Installing dependencies..."
- apt-get update -qq && apt-get install -y -qq sshpass
- apt-get install -y -qq rsync
Expand All @@ -34,7 +36,7 @@ deploy-job:
- pnpm build
- echo "Deploying..."
script:
- rsync -azPhhr -e 'ssh -p 100' .output $SSH_USER@$SSH_IP:/home/$SSH_USER/www/$CI_PROJECT_NAME/.output-$CI_JOB_ID
- rsync -azPhhr .output $SSH_USER@$SSH_IP:/home/$SSH_USER/www/$CI_PROJECT_NAME/.output-$CI_JOB_ID
- ssh -p $SSH_PORT $SSH_USER@$SSH_IP "
. ~/.zshrc &&
cd /home/$SSH_USER/www/$CI_PROJECT_NAME &&
Expand Down

0 comments on commit 102ddd7

Please sign in to comment.