Skip to content

Daily Data Pipeline #48

Daily Data Pipeline

Daily Data Pipeline #48

name: Daily Data Pipeline
on:
schedule:
- cron: '30 20 * * *'
workflow_dispatch:
permissions:
contents: write
issues: write
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run scraper
run: |
python run_scraper.py
continue-on-error: true
- name: Train model (skip if scraper fails)
if: success()
run: |
python -m ml_model.model_trainer
- name: Check drift
if: success()
run: |
python check_drift.py
continue-on-error: true
- name: Commit and push
if: success()
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action Bot"
git add data/
git diff --quiet && git diff --staged --quiet || git commit -m "馃 Auto-update: $(date '+%Y-%m-%d %H:%M')"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}