Skip to content

Commit 43e8fc6

Browse files
ci: use correct ssh port
1 parent 4a06530 commit 43e8fc6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ jobs:
6161
- name: Add VPS to known hosts
6262
run: |
6363
mkdir -p ~/.ssh
64-
ssh-keyscan -H ${{ secrets.VPS_HOST }} >> ~/.ssh/known_hosts
64+
ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.VPS_HOST }} >> ~/.ssh/known_hosts
6565
6666
- name: Deploy to VPS
6767
env:
6868
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
69+
SSH_PORT: ${{ secrets.SSH_PORT }}
6970
VPS_HOST: ${{ secrets.VPS_HOST }}
7071
REPO_PATH: ${{ secrets.REPO_PATH }}
7172
VITE_APP_API_URL: ${{ secrets.VITE_APP_API_URL }}
@@ -76,7 +77,7 @@ jobs:
7677
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deploy_key
7778
chmod 600 ~/.ssh/deploy_key
7879
79-
ssh -i ~/.ssh/deploy_key deploy@$VPS_HOST << 'EOF'
80+
ssh -p $SSH_PORT -i ~/.ssh/deploy_key deploy@$VPS_HOST << 'EOF'
8081
set -e
8182
8283
# Navigate to repo directory

0 commit comments

Comments
 (0)