Skip to content

Daily Update Pipeline #231

Daily Update Pipeline

Daily Update Pipeline #231

name: Daily Update Pipeline
on:
schedule:
- cron: "0 11 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
update_pipeline:
runs-on: ubuntu-latest
env:
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt
- name: Debug env vars
run: |
echo "KAGGLE_USERNAME length: ${#KAGGLE_USERNAME}"
echo "KAGGLE_KEY length: ${#KAGGLE_KEY}"
- name: Run dataset_downloader.py
run: |
python backend/dataset_downloader.py
- name: Sleep for 1 second
run: |
sleep 1
- name: Run dataset_preprocessor.py
run: |
python backend/dataset_preprocessor.py
- name: Sleep for 1 second
run: |
sleep 1
- name: Run lstm_forecaster.py
run: |
python backend/lstm_forecaster.py
- name: Sleep for 1 second
run: |
sleep 1
- name: Commit and Push Changes
run: |
git config --global user.name "SahandNamvar"
git config --global user.email "${{ secrets.GIT_EMAIL }}"
git add .
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "Automated daily update: $(date +'%Y-%m-%d %H:%M:%S')"
git push origin main
fi