eeg_nest/deploy.sh

28 lines
719 B
Bash
Raw Normal View History

2023-05-09 15:56:41 +00:00
export DEPLOY_PATH=/home4/educa7ls/staging.eegsac.com
# Install dependencies
pnpm i --frozen-lockfile
# Build Nestjs
pnpm build
# Build JSX files
node ./esbuild-prod.js
# Build hydration script
node ./esbuild-client-prod.js
# Build tailwind
./node_modules/.bin/tailwindcss -i static/tailwind.css -o ./static/styles.css --minify
# Remove previous deployments
rm -rf $DEPLOY_PATH/*
# Move files to deploy path
/bin/cp -r ./dist $DEPLOY_PATH
/bin/cp -r ./static $DEPLOY_PATH
/bin/cp ./package.json $DEPLOY_PATH
/bin/cp ./pnpm-lock.yaml $DEPLOY_PATH
/bin/cp ./.htaccess $DEPLOY_PATH
# Remove build dependencies
rm -rf ./node_modules
# Install prod deps
cd $DEPLOY_PATH
pnpm i --frozen-lockfile --prod