Skip to content

Add utility script to auto-generate index tables documentation with interactive Mermaid diagrams #1

Add utility script to auto-generate index tables documentation with interactive Mermaid diagrams

Add utility script to auto-generate index tables documentation with interactive Mermaid diagrams #1

name: Update Indices Documentation
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
pull_request:
paths:
- "pyproject.toml"
permissions:
contents: write
pull-requests: write
jobs:
update-docs:
name: Update indices_reference.md
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install -e .
- name: Generate documentation
run: |
python scripts/generate_indices_docs.py
- name: Build documentation
run: |
python -m pip install -e .[docs]
cd docs
sphinx-build -W -b html . _build/html
- name: Check for changes
id: git-check
run: |
git diff --exit-code docs/indices_reference.md || echo "changed=true" >> $GITHUB_OUTPUT
- name: Configure git
if: steps.git-check.outputs.changed == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Create Pull Request
if: steps.git-check.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v6
with:
commit-message:
"docs: update indices_reference.md with latest schemas"
title: "Update indices documentation with latest schemas"
body: |
This PR updates `docs/indices_reference.md` with the latest schema information from `idc-index-data`.
The documentation was automatically generated by running `scripts/generate_indices_docs.py`.
## Changes
- Updated index table schemas
- Refreshed Mermaid diagram with current table relationships
- Updated column descriptions
branch: update-indices-docs
delete-branch: true
labels: documentation