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 0151d8a commit ed22c9eCopy full SHA for ed22c9e
.github/workflows/deploy.yml
@@ -0,0 +1,27 @@
1
+name: Deploy via SSH
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
8
+jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - name: Checkout repo
14
+ uses: actions/checkout@v4
15
16
+ - name: Set up SSH
17
+ uses: webfactory/ssh-agent@v0.9.0
18
+ with:
19
+ ssh-private-key: ${{ secrets.SSH_KEY }}
20
21
+ - name: Connect and Deploy
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
27
+ EOF
0 commit comments