File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -33,30 +33,21 @@ jobs:
3333 chmod 600 ~/.ssh/deployment_key
3434 echo "$VM_PASSPHRASE" | ssh-add ~/.ssh/deployment_key
3535
36- - name : Ensure SSH Config File Exists
37- run : |
38- # Ensure the SSH config file exists
39- mkdir -p ~/.ssh
40- if [ ! -f ~/.ssh/config ]; then
41- echo -e "Host *\n IdentitiesOnly yes\n StrictHostKeyChecking accept-new\n LogLevel VERBOSE" > ~/.ssh/config
42- fi
43- chmod 600 ~/.ssh/config
44-
4536 - name : Add VM to known_hosts
4637 run : |
4738 ssh-keyscan -H ${{ secrets.VM_HOST }} >> ~/.ssh/known_hosts
4839
4940 - name : Synchronize Code with VM Using rsync
5041 env :
51- RSYNC_RSH : " ssh -i ~/.ssh/deployment_key -F ~/.ssh/config -o LogLevel=DEBUG "
42+ RSYNC_RSH : " ssh -i ~/.ssh/deployment_key -o IdentitiesOnly=yes "
5243 run : |
5344 rsync -avz --checksum --exclude='.env' --exclude='.git' ./ ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }}:/home/dev/
5445
5546 - name : Restart Docker Compose Services
56475748 with :
5849 host : ${{ secrets.VM_HOST }}
59- username : ${{ secrets.VM_USER }}
50+ username : dev # Use the 'dev' user instead of 'root'
6051 key : ${{ secrets.SSH_PRIVATE_KEY }}
6152 script : |
6253 echo "Stopping existing Docker Compose services..."
You can’t perform that action at this time.
0 commit comments