init1
Production deploy / build (push) Successful in 1m35s
Details
Production deploy / build (push) Successful in 1m35s
Details
This commit is contained in:
parent
33cb73f5d6
commit
429812182b
|
|
@ -31,14 +31,30 @@ jobs:
|
|||
run: |
|
||||
set -e
|
||||
cd repo
|
||||
mkdir -p /data/wildgrowth/weizhuozhongzhi-ai
|
||||
rm -rf /data/wildgrowth/weizhuozhongzhi-ai/*
|
||||
cp -r backend/* /data/wildgrowth/weizhuozhongzhi-ai/
|
||||
mkdir -p /data/wildgrowth/backend
|
||||
rm -rf /data/wildgrowth/backend/*
|
||||
cp -r backend/* /data/wildgrowth/backend/
|
||||
|
||||
- name: npm install and prisma
|
||||
run: |
|
||||
set -e
|
||||
cd /data/wildgrowth/weizhuozhongzhi-ai
|
||||
cd /data/wildgrowth/backend
|
||||
npm install
|
||||
npm run prisma:generate
|
||||
npm run prisma:migrate:deploy
|
||||
|
||||
- name: Build backend
|
||||
run: |
|
||||
set -e
|
||||
cd /data/wildgrowth/backend
|
||||
npm run build -- --outDir ../dist
|
||||
|
||||
- name: Start or reload with pm2
|
||||
run: |
|
||||
set -e
|
||||
cd /data/wildgrowth/backend
|
||||
if pm2 describe wildgrowth >/dev/null 2>&1; then
|
||||
pm2 reload wildgrowth
|
||||
else
|
||||
pm2 start ../dist/index.js --name "wildgrowth"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue