Skip to content

Commit

Permalink
Update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nhamonin committed Dec 13, 2024
1 parent 9acfbed commit 7212d26
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/deploy-to-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@ jobs:
key: ${{ secrets.PRIVATE_KEY }}
port: 22
script: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
cd ~/faceit-statistics
git pull
npm ci
# Use specific Node version (replace 16 with your desired version)
nvm use 16 || nvm install 16
# Clear npm cache and install dependencies
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
# Restart PM2
PATH="$PATH:$HOME/.nvm/versions/node/$(nvm current)/bin"
pm2 restart pm2.config.cjs

0 comments on commit 7212d26

Please sign in to comment.