Manual deploy file

master
Fernando 2023-05-09 10:56:41 -05:00
parent f5ccd2a692
commit cd71cb4e17
1 changed files with 28 additions and 0 deletions

28
deploy.sh Normal file
View File

@ -0,0 +1,28 @@
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