Skip to content

Commit ba9836a

Browse files
authored
Add TOC generator workflow configuration
1 parent 25e90a8 commit ba9836a

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/toc.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: TOC Generator
2+
3+
on:
4+
push:
5+
# run on pushes to default branch; adjust if you prefer e.g. pull_request
6+
branches:
7+
- main
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
generateTOC:
13+
name: Generate/Update TOC
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Run TOC Generator (technote-space/toc-generator)
22+
uses: technote-space/toc-generator@v4
23+
with:
24+
# target files to update (comma separated)
25+
TARGET_PATH: README.md
26+
# commit changes directly on push; set CREATE_PR:true to create PR instead
27+
CREATE_PR: false
28+
# set the commit message the action will use when updating README
29+
COMMIT_MESSAGE: chore(docs): update Table of Contents

0 commit comments

Comments
 (0)