scrape #92778
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: scrape | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
# Run every 20 minutes | |
- cron: '*/20 * * * *' | |
workflow_dispatch: {} | |
jobs: | |
scrape: | |
name: Scrape leaderboard data | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- run: bin/scrape-kattis > data/kattis.json | |
- run: | | |
git config user.name "Leaderboard scraper" | |
git config user.email "encode@jtk.polban.ac.id" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Update leaderboard per $timestamp" || exit 0 | |
git push |