-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.02 KB
/
prod-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: PROD-DEPLOY
on:
push:
branches: [main]
jobs:
main-deploy:
runs-on:
group: Default
labels: [self-hosted, Linux, x64]
environment:
name: production
url: ''
strategy:
matrix:
node-version: [lts/*]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: install yarn
run: npm i -g yarn
- name: remove dist folder
run: rm -rf dist
- name: yarn install
run: yarn install --frozen-lockfile
- name: 'Create env file'
run: |
echo '${{ secrets.STAGE_ENV_FILE }}' > .env
- name: prisma generate
run: yarn gen
- name: prisma generate schema
run: yarn prisma generate --schema prisma/schema.prisma
- name: build
run: yarn build
- name: start or reload server
run: pm2 startOrGracefulReload ecosystem.config.js