-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.04 KB
/
deploy.yml
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
38
39
40
41
42
43
44
45
46
47
name: Deploy to Server
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run install
run: |
npm install
- name: Run build
run: |
npm run build
- name: Deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
debug: true
source: ".nuxt,.output,prisma "
target: /srv/www/ibot
- name: prisma migrate deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script: |
cd /srv/www/ibot/
npx prisma generate
npx prisma migrate deploy
npm install
npx pm2 reload ibot || npx pm2 start npm --name "ibot" -- run start