Update Prediction Files #33
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: Update Prediction Files | |
on: | |
schedule: | |
# Run daily at 3 AM UTC | |
- cron: '0 3 * * *' | |
workflow_dispatch: # Allows manual triggering of the workflow | |
{} | |
jobs: | |
run-prediction-script: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: | | |
pip install -r predictions/requirements.txt | |
# Step 4: Add the `predictions` folder to PYTHONPATH | |
- name: Add to PYTHONPATH | |
run: | | |
echo "PYTHONPATH=$(pwd)/predictions" >> $GITHUB_ENV | |
# Step 5: Run the script | |
- name: Run main.py | |
run: | | |
python predictions/main.py |