Skip to content

Fix image generation problem with new puppeteer dependency version #280

Fix image generation problem with new puppeteer dependency version

Fix image generation problem with new puppeteer dependency version #280

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