We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42d6544 commit 032ae32Copy full SHA for 032ae32
.github/workflows/deploy-git-ssh-key.yml
@@ -1,4 +1,4 @@
1
-name: Deploy via SSH
+name: Deploy via SSH by Key
2
3
on:
4
push:
@@ -22,6 +22,8 @@ jobs:
22
run: |
23
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << 'EOF'
24
cd ${{ secrets.PROJECT_PATH }}
25
- git pull origin main
26
- pm2 restart 3
+ git fetch origin main
+ git reset --hard origin/main
27
+ git clean -fd
28
+ ${{ secrets.RESTART_COMMAND }}
29
EOF
0 commit comments