From c0daa71692bf56bf5ad24e4c0540115c298181ff Mon Sep 17 00:00:00 2001 From: Darryl Ong Date: Fri, 19 Jun 2026 18:08:33 +0800 Subject: [PATCH 1/2] Add action for automating readthedocs model page updating --- .github/workflows/update-model-table.yml | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/update-model-table.yml diff --git a/.github/workflows/update-model-table.yml b/.github/workflows/update-model-table.yml new file mode 100644 index 00000000..53cc5735 --- /dev/null +++ b/.github/workflows/update-model-table.yml @@ -0,0 +1,39 @@ +name: update-model-table + +on: + push: + branches: [master] + paths: + - 'README.md' + - 'docs/generate_model_js.py' + release: + types: [published] + +jobs: + update-model-table: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Run model table generation script + working-directory: docs + run: python generate_model_js.py + + - name: Commit and push if changed + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add docs/source/_static/models/data.js + if git diff --cached --quiet; then + echo "No changes to commit" + else + git commit -m "docs: auto-update model table [skip ci]" + git push + fi From e6674ceb36b6dba90fad4e0bdfb8676476b573fb Mon Sep 17 00:00:00 2001 From: darrylong Date: Tue, 23 Jun 2026 18:38:00 +0800 Subject: [PATCH 2/2] Prevent concurrency issues for concurrent runs Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/update-model-table.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update-model-table.yml b/.github/workflows/update-model-table.yml index 53cc5735..ce61c239 100644 --- a/.github/workflows/update-model-table.yml +++ b/.github/workflows/update-model-table.yml @@ -9,6 +9,10 @@ on: release: types: [published] +concurrency: + group: update-model-table + cancel-in-progress: true + jobs: update-model-table: runs-on: ubuntu-latest