Skip to content

Update Questions

Update Questions #2

name: Update Questions
on:
schedule:
# Every Sunday at 8am EST (1pm UTC)
- cron: "0 13 * * 0"
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Update question metadata
working-directory: cron
env:
LEETCODE_SESSION_TOKEN: ${{ secrets.LEETCODE_SESSION_TOKEN }}
LEETCODE_CSRF_TOKEN: ${{ secrets.LEETCODE_CSRF_TOKEN }}
LEETCODE_CF_CLEARANCE: ${{ secrets.LEETCODE_CF_CLEARANCE }}
run: python update_questions.py
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add src/data/questions.json
git diff --cached --quiet || git commit --author="Sean Prashad <13009507+seanprashad@users.noreply.github.com>" -m "chore: update question metadata" && git push