From a16eb63aa7ff37b0b62f9dec473226177ed0e010 Mon Sep 17 00:00:00 2001 From: Gopibabu Srungavarapu Date: Mon, 23 Oct 2023 22:13:21 -0400 Subject: [PATCH] updated deployment github action --- .scripts/deploy.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.scripts/deploy.sh b/.scripts/deploy.sh index 814f384..1531bd4 100755 --- a/.scripts/deploy.sh +++ b/.scripts/deploy.sh @@ -3,14 +3,14 @@ set -e NODE_PATH=/root/.nvm/versions/node/v18.10.0/bin/node -# PM2_PATH=/root/.nvm/versions/node/v18.10.0/bin/pm2 +PM2_PATH=/root/.nvm/versions/node/v18.10.0/bin/pm2 NPM_PATH=/root/.nvm/versions/node/v18.10.0/bin/npm echo "Deployment started ..." # Enter maintenance mode or return true # if already is in maintenance mode -($NODE_PATH $NPM_PATH run stop --message 'The app is being (quickly!) updated. Please try again in a minute.') || true +($NODE_PATH $PM2_PATH stop server.js --message 'The app is being (quickly!) updated. Please try again in a minute.') || true # Pull the latest version of the app git fetch origin master @@ -18,9 +18,9 @@ git reset --hard origin/master git pull origin master # Compile npm assets -$NODE_PATH $NPM_PATH install --omit=dev +$NPM_PATH install --omit=dev # Exit maintenance mode -$NODE_PATH $NPM_PATH run start +$NODE_PATH $PM2_PATH start server.js echo "Deployment finished!"