Skip to content

Commit

Permalink
modified: .github/workflows/ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Revulate committed Oct 16, 2024
1 parent c6823e5 commit 16f2f04
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ jobs:
python3.11 -m venv venv
fi
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
if [ ! -f "venv/.requirements_installed" ] || ! cmp -s requirements.txt venv/.requirements_installed; then
python -m pip install --upgrade pip
pip install -r requirements.txt
cp requirements.txt venv/.requirements_installed
fi
deploy:
runs-on: self-hosted
Expand Down Expand Up @@ -69,7 +72,10 @@ jobs:
python3.11 -m venv venv
fi
source venv/bin/activate
pip install -r requirements.txt
if [ ! -f "venv/.requirements_installed" ] || ! cmp -s requirements.txt venv/.requirements_installed; then
pip install -r requirements.txt
cp requirements.txt venv/.requirements_installed
fi
# Create .env file (using existing secrets)
cat <<EOF > .env
Expand Down Expand Up @@ -142,7 +148,7 @@ jobs:
fi
# Start or restart the bot using PM2
pm2 start ecosystem.config.js --update-env || pm2 restart ecosystem.config.js --update-env
pm2 start ecosystem.config.js --update-env || pm2 delete twitch-bot && pm2 start ecosystem.config.js --update-env
pm2 save
sudo pm2 startup systemd -u $USER --hp $HOME
Expand Down

0 comments on commit 16f2f04

Please sign in to comment.