Skip to content

Commit 032ae32

Browse files
authored
Update deploy-git-ssh-key.yml
1 parent 42d6544 commit 032ae32

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/deploy-git-ssh-key.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy via SSH
1+
name: Deploy via SSH by Key
22

33
on:
44
push:
@@ -22,6 +22,8 @@ jobs:
2222
run: |
2323
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << 'EOF'
2424
cd ${{ secrets.PROJECT_PATH }}
25-
git pull origin main
26-
pm2 restart 3
25+
git fetch origin main
26+
git reset --hard origin/main
27+
git clean -fd
28+
${{ secrets.RESTART_COMMAND }}
2729
EOF

0 commit comments

Comments
 (0)