Skip to content

Commit a380b7c

Browse files
dfredmota999claude
andcommitted
fix(ci): correct VM_IP to use secret + SSH deploy_key pattern
- VM_IP was hardcoded to terminated VM (34.35.36.178), now uses secrets.VM_IP - SSH key uses deploy_key + ssh config (same pattern as Malaria deploy) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a170059 commit a380b7c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
GO_VERSION: "1.24"
9-
VM_IP: "34.35.36.178"
9+
VM_IP: ${{ secrets.VM_IP }}
1010
VM_USER: "web2a"
1111

1212
jobs:
@@ -53,9 +53,13 @@ jobs:
5353
- name: Setup SSH key
5454
run: |
5555
mkdir -p ~/.ssh
56-
printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
57-
chmod 600 ~/.ssh/id_rsa
56+
printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
57+
chmod 600 ~/.ssh/deploy_key
5858
ssh-keyscan -H ${{ env.VM_IP }} >> ~/.ssh/known_hosts 2>/dev/null
59+
echo "Host *
60+
IdentityFile ~/.ssh/deploy_key
61+
StrictHostKeyChecking accept-new" > ~/.ssh/config
62+
chmod 600 ~/.ssh/config
5963
6064
- name: Deploy via SSH (git pull + build + restart)
6165
run: |

0 commit comments

Comments
 (0)