Skip to content

Commit

Permalink
Update deploy actions for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperBlue committed Dec 13, 2024
1 parent 639041e commit 5ae868d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ jobs:
port: 22
script: |
cd ${{ vars.REPOSITORY_DIRECTORY }}
git pull origin production
echo "Fetching latest version from the production branch"
git fetch --all
git reset --hard origin/production
git status
npm install --only=prod
echo "Installing updates"
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm ci
echo "Building project"
npm build
npx pm2 restart ${{ vars.PM2_PROCESS }}
echo "Restarting PM2 Process ${{ vars.PM2_PROCESS }}"
PM2_HOME=/root/.pm2 pm2 restart ${{ vars.PM2_PROCESS }}
run: |
echo Pull request merged and deployed to Production

0 comments on commit 5ae868d

Please sign in to comment.