From 821f385933f2e2d71699fda0a617ca2989035774 Mon Sep 17 00:00:00 2001 From: Philipp Rossak Date: Fri, 10 Feb 2023 19:13:37 +0100 Subject: [PATCH] Add auto_toc_update with github actions --- .github/workflows/auto_toc_update.yml | 20 ++++++++++++++++++++ README.md | 4 +++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/auto_toc_update.yml diff --git a/.github/workflows/auto_toc_update.yml b/.github/workflows/auto_toc_update.yml new file mode 100644 index 0000000..ed1f278 --- /dev/null +++ b/.github/workflows/auto_toc_update.yml @@ -0,0 +1,20 @@ +name: auto-toc-update +on: + push: + branches: [main] + paths: ['foo.md'] + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v2 + - run: | + curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/0.8.0/gh-md-toc -o gh-md-toc + chmod a+x gh-md-toc + ./gh-md-toc --insert --no-backup --hide-footer foo.md + rm gh-md-toc + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Auto update markdown TOC diff --git a/README.md b/README.md index 021201f..f2d9da5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Bambulab RFID Tag Hacking Guide -[TOC] + + + ## Before you start