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 65ebabe commit dd640cbCopy full SHA for dd640cb
.github/workflows/deploy.yml
@@ -0,0 +1,31 @@
1
+name: Deploy to VPS
2
+
3
+on:
4
+ release:
5
+ types: [published]
6
7
+jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v2
14
15
+ - name: Set up SSH
16
+ uses: webfactory/ssh-agent@v0.5.4
17
+ with:
18
+ ssh-private-key: ${{ secrets.SSH_PRIVATE }}
19
20
21
+ - name: Deploy to VPS
22
+ run: |
23
+ ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_IP }} << 'EOF'
24
+ cd pingernos
25
+ git pull origin Python
26
+ venv/bin/pip install -r requirements.txt
27
+ WATCH_MODE=$(pm2 jlist | jq -r '.[] | select(.name == "pingernos") | .pm2_env.watch')
28
+ if [[ "$WATCH_MODE" != "true" ]]; then
29
+ pm2 restart pingernos --watch
30
+ fi
31
+ EOF
0 commit comments