Scheduled Web Scraping of Completions Stats #267
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: 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 |