From cd71cb4e179feb7e84262896a68673055e97f1b7 Mon Sep 17 00:00:00 2001 From: Fernando Date: Tue, 9 May 2023 10:56:41 -0500 Subject: [PATCH] Manual deploy file --- deploy.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..c094e3b --- /dev/null +++ b/deploy.sh @@ -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 \ No newline at end of file