Run Python Automation Bot #113
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: Run Python Automation Bot | |
on: | |
schedule: | |
# Run at 7 AM, 12:30 PM, and 7 PM daily | |
- cron: "0 7,19 * * *" # Runs at 7:00 AM and 7:00 PM | |
- cron: "30 12 * * *" # Runs at 12:30 PM | |
jobs: | |
run-bot: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" # Set to the version your script requires | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# Step 4: Run the Python automation script | |
- name: Run auto.py | |
run: python auto.py |