Update stats #4392
This file contains hidden or 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 stats | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| scrape_stats_schedule: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: pip install requests pyyaml beautifulsoup4 | |
| - name: Run the scraping script | |
| run: python _scripts/scrape_stats.py | |
| - run: | | |
| git config user.name github-actions | |
| git config user.email [email protected] | |
| git add _data/stats.yml _data/complete_stats.yml | |
| git diff-index --quiet --cached HEAD || git commit -m "Scrape Stats Job: Update stats" | |
| git push |