Skip to content

Scheduled Web Scraping of Completions Stats #267

Scheduled Web Scraping of Completions Stats

Scheduled Web Scraping of Completions Stats #267

name: Scheduled Web Scraping of Completions Stats
on:
schedule:
- cron: "0 12 * * *"
permissions:
contents: write
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.11 with caching
uses: actions/setup-python@v2
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run script
run: python scrape_completion_stats.py
- name: Commit changes to database
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git pull
git add aoc.db
git commit -m "Add new completion stat time slice to DB" || echo "No changes to commit"
git push