From 72b9821a8d0d489d70ee6286699ab6cbceb51a42 Mon Sep 17 00:00:00 2001 From: Jacob Kraniak <113630934+jacob-kraniak@users.noreply.github.com> Date: Sat, 7 Mar 2026 21:05:24 -0500 Subject: [PATCH] Create update-toc.yml --- .github/workflows/update-toc.yml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/update-toc.yml diff --git a/.github/workflows/update-toc.yml b/.github/workflows/update-toc.yml new file mode 100644 index 0000000..99e9929 --- /dev/null +++ b/.github/workflows/update-toc.yml @@ -0,0 +1,33 @@ +name: Update TOC + +on: + push: + branches: [ JK_Revisions ] + paths: + - '**.md' # Trigger on any markdown change + +jobs: + update-toc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Important for commit history + + - name: Install doctoc + run: npm install -g doctoc + + - name: Run doctoc on README and INDEX files + run: | + doctoc README.md + doctoc tools/_INDEX.md # or tools/INDEX.md after rename + doctoc documentation/INDEX.md + # Add more files as needed, e.g.: + # doctoc tools/security/INDEX.md + + - name: Commit changes if any + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "chore: auto-update TOC [skip ci]" + branch: JK_Revisions + skip_dirty_check: false