Skip to content

Update README.md

Update README.md #2

Workflow file for this run

name: Update README TOC
on:
push:
paths:
- "README.md"
workflow_dispatch: {}
permissions:
contents: write
jobs:
doctoc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Needed so we can push back to the same branch
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install doctoc
run: npm install -g doctoc
- name: Generate TOC
run: |
doctoc --maxlevel 4 README.md
- name: Commit & push if changed
run: |
if git diff --quiet; then
echo "No TOC changes."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "chore: update README TOC"
git push