AtCoder Submissions Crawler #697
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: AtCoder Submissions Crawler | |
on: | |
schedule: | |
# UTC 19:00 (JST 4:00) | |
- cron: "0 19 * * *" | |
workflow_dispatch: | |
jobs: | |
crawl: | |
name: Crawl AtCoder Submissions | |
runs-on: ubuntu-latest | |
env: | |
TZ: Asia/Tokyo | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
fetch-depth: 100 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r _src/requirements.txt | |
- name: Import GPG | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{secrets.GPG_PRIVATE_KEY}} | |
passphrase: ${{secrets.PASSPHRASE}} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Crawl and Commit | |
run: python _src/main.py | |
- name: Push | |
run: git push |