Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/update-model-table.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: update-model-table

on:
push:
branches: [master]
paths:
- 'README.md'
- 'docs/generate_model_js.py'
release:
types: [published]

concurrency:
group: update-model-table
cancel-in-progress: true

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
Loading