File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -23,20 +23,26 @@ jobs:
2323 SSH_PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY }}
2424 VM_PASSPHRASE : ${{ secrets.VM_PASSPHRASE }}
2525 run : |
26+ # Clear any previously loaded keys
27+ ssh-add -D
28+ # Set up the SSH directory and key
2629 mkdir -p ~/.ssh
2730 echo "$SSH_PRIVATE_KEY" > ~/.ssh/deployment_key
2831 chmod 600 ~/.ssh/deployment_key
2932 eval "$(ssh-agent -s)"
30- ssh-add -D # Clear any other SSH keys
3133 echo "$VM_PASSPHRASE" | ssh-add ~/.ssh/deployment_key
3234
35+ - name : Configure SSH Settings
36+ run : |
37+ echo -e "Host *\n IdentitiesOnly yes\n StrictHostKeyChecking accept-new\n LogLevel VERBOSE" > ~/.ssh/config
38+
3339 - name : Add VM to known_hosts
3440 run : |
3541 ssh-keyscan -H ${{ secrets.VM_HOST }} >> ~/.ssh/known_hosts
3642
3743 - name : Synchronize Code with VM Using rsync
3844 env :
39- RSYNC_RSH : " ssh -i ~/.ssh/deployment_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new "
45+ RSYNC_RSH : " ssh -i ~/.ssh/deployment_key -F ~/.ssh/config -o LogLevel=DEBUG "
4046 run : |
4147 rsync -avz --checksum --exclude='.env' --exclude='.git' ./ ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }}:/home/dev/
4248
You can’t perform that action at this time.
0 commit comments