Skip to content

Commit d7e0761

Browse files
authored
README: add "TOC with Github Actions". Fixes #93
1 parent 327408f commit d7e0761

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
345372
Tests
346373
=====
347374

0 commit comments

Comments
 (0)