Fix broken css + remove log #281
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD with PM2 | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy using ssh | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
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 | |
# Use specific Node version (replace 16 with your desired version) | |
nvm use 22 | |
# 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 |