Skip to content

Commit 78e0561

Browse files
authored
Update main.yml
1 parent 5935629 commit 78e0561

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deployment_key
2828
chmod 600 ~/.ssh/deployment_key
2929
eval "$(ssh-agent -s)"
30-
# Add the private key to the agent and provide the passphrase non-interactively
3130
echo "$VM_PASSPHRASE" | ssh-add ~/.ssh/deployment_key
3231
3332
- name: Add VM to known_hosts
@@ -36,9 +35,9 @@ jobs:
3635
3736
- name: Synchronize Code with VM Using rsync
3837
env:
39-
RSYNC_RSH: "ssh -i ~/.ssh/deployment_key -o IdentitiesOnly=yes" # Explicitly specify the SSH key for rsync
38+
RSYNC_RSH: "ssh -i ~/.ssh/deployment_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new -o MaxAuthTries=1"
4039
run: |
41-
rsync -avz --checksum --exclude='.git' ./ ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }}:/home/dev/
40+
rsync -avz --checksum --exclude='.env' --exclude='.git' ./ ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }}:/home/dev/
4241
4342
- name: Restart Docker Compose Services
4443
uses: appleboy/[email protected]

0 commit comments

Comments
 (0)