fix: improve deploy

This commit is contained in:
fantasticit 2022-03-24 13:34:06 +08:00
parent 9697d0e811
commit ddaa251afc
3 changed files with 12 additions and 1 deletions

11
bin/update.sh Normal file
View File

@ -0,0 +1,11 @@
#! /bin/bash
cd /apps/think
git checkout main
git pull
pnpm install
pnpm run build
pm2 restart @think/server
pm2 restart @think/client

View File

@ -17,7 +17,7 @@
"start": "concurrently \"pnpm:start:*\"",
"start:server": "pnpm run --dir packages/server start",
"start:client": "pnpm run --dir packages/client start",
"pm2": "concurrently \"pnpm:pm2:*\"",
"pm2": "pnpm run pm2:server && pnpm run pm2:client",
"pm2:server": "pnpm run --dir packages/server pm2",
"pm2:client": "pnpm run --dir packages/client pm2",
"format": "prettier --write --parser typescript \"packages/**/*.ts?(x)\""