-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (35 loc) · 1.02 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: deploy
on:
push:
paths:
- 'libs/**'
- 'src/**'
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:githubdeploy
- name: Deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOSTNAME }}
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script_stop: true
script: |
cd ${{ secrets.SERVER_CWD }}
git pull origin main
/root/.nvm/versions/node/v21.7.1/bin/pnpm i --force
/root/.nvm/versions/node/v21.7.1/bin/pnpx prisma db push
/root/.nvm/versions/node/v21.7.1/bin/pnpm run build
supervisorctl restart personal-whatsapp-bot
git checkout -- pnpm-lock.yaml