Update tg-bot.yml #10
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: Deploy Telegram Bot | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# schedule: | |
# - cron: '0 */x * * *' # Runs every x hours | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 # Modify based on your need | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ffmpeg | |
python -m pip install --upgrade pip | |
pip install python-telegram-bot==13.11 spotdl mutagen pillow | |
- name: Run bot script | |
env: | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
run: python tg-bot.py |