Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 authored Sep 20, 2024
1 parent 2844297 commit 6a7923b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Deploy Discord Bot

on:
schedule:
# Запускать каждые 7 часов
- cron: '0 */7 * * *'
# push:
# branches:
# - main
# Запускать каждые 5 часов
- cron: '0 */5 * * *'

jobs:
deploy:
Expand All @@ -31,8 +28,12 @@ jobs:
echo "DISCORD_KEY=${{ secrets.DISCORD_KEY }}" >> $GITHUB_ENV
echo "GITHUB=${{ secrets.GITHUB }}" >> $GITHUB_ENV
- name: Kill previous bot instance (if running)
run: |
pkill -f main.py || true
- name: Run bot
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
run: |
python main.py
python main.py &

0 comments on commit 6a7923b

Please sign in to comment.