Skip to content

Update LeetCode Grid #14

Update LeetCode Grid

Update LeetCode Grid #14

name: Update LeetCode Grid
on:
push:
paths:
- "Solutions/**"
- "Scripts/update_project_readme.py"
workflow_dispatch:
workflow_run:
workflows: ["Sync Leetcode"]
types:
- completed
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install pyyaml requests
- name: Generate LeetCode README table
run: |
python ./Scripts/update_project_readme.py
- name: Commit and push changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add README.md Site_README.md
git diff-index --quiet HEAD || git commit -m "[Auto] Update LeetCode README table"
git push