We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ac7e74 commit e33cb2eCopy full SHA for e33cb2e
.github/workflows/deploy.yml
@@ -0,0 +1,26 @@
1
+name: Deploy on Release
2
+
3
+on:
4
+ release:
5
+ types: [published]
6
7
+jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Deploy via SSH
12
+ uses: appleboy/ssh-action@v1.0.3
13
+ with:
14
+ host: ${{ secrets.SSH_HOST }}
15
+ username: ${{ secrets.SSH_USER }}
16
+ key: ${{ secrets.SSH_KEY }}
17
+ port: ${{ secrets.SSH_PORT || 22 }}
18
+ script: |
19
+ set -e
20
+ cd /var/www/myapp
21
+ git fetch --tags --force
22
+ git checkout ${{ github.event.release.tag_name }}
23
+ # build/installeer (pas aan op jouw stack)
24
+ npm ci
25
+ npm run build
26
+ pm2 reload myapp || pm2 start npm --name myapp -- start
0 commit comments