Skip to content

Commit e32d2e1

Browse files
authored
Update main.yml
1 parent fe0cb9c commit e32d2e1

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff 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
5647
uses: appleboy/[email protected]
5748
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..."

0 commit comments

Comments
 (0)