Merge pull request #41 from sbryngelson/improve #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Markdown TOC | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
update-toc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ github.token }} | |
- name: Generate TOC | |
uses: technote-space/toc-generator@v4 | |
with: | |
GITHUB_TOKEN: ${{ github.token }} | |
TOC_TITLE: "## Table of Contents" | |
TARGET_PATHS: "group-syllabus/*.md" | |
FOLDING: false | |
CREATE_PR: true | |
PR_BRANCH_NAME: "update-toc-${PR_ID}" | |
PR_BRANCH_PREFIX: "toc-generator/" | |
PR_TITLE: "docs: update TOC" | |
COMMIT_MESSAGE: "Update TOC in markdown files" | |
COMMIT_NAME: "GitHub Action" | |
COMMIT_EMAIL: "action@github.com" | |
MAX_HEADER_LEVEL: 4 |