File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ Table of contents
3939 * [ Combo] ( #combo )
4040 * [ Auto insert and update TOC] ( #auto-insert-and-update-toc )
4141 * [ GitHub token] ( #github-token )
42+ * [ TOC generation with Github Actions] ( #toc-generation-with-github-actions )
4243 * [ Tests] ( #tests )
4344 * [ Dependency] ( #dependency )
4445 * [ Docker] ( #docker )
@@ -342,6 +343,32 @@ Table of Contents
342343* [LICENSE](#license)
343344```
344345
346+ TOC generation with Github Actions
347+ ----------------------------------
348+
349+ Config:
350+
351+ ```yaml
352+ on:
353+ push:
354+ branches: [main]
355+ paths: [' foo.md' ]
356+
357+ jobs:
358+ build:
359+ runs-on: ubuntu-latest
360+ timeout-minutes: 5
361+ steps:
362+ - uses: actions/checkout@v2
363+ - run: |
364+ curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
365+ chmod a+x gh-md-toc
366+ ./gh-md-toc --insert --no-backup foo.md
367+ - uses: stefanzweifel/git-auto-commit-action@v4
368+ with:
369+ commit_message: Auto update markdown TOC
370+ ```
371+
345372Tests
346373=====
347374
You can’t perform that action at this time.
0 commit comments