Skip to content

Commit 1b66447

Browse files
committed
toc
1 parent d9b45dc commit 1b66447

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/update-toc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,30 @@ on:
88
- master
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
1115
jobs:
1216
update-toc:
1317
runs-on: ubuntu-latest
1418
steps:
1519
- uses: actions/checkout@v4
1620
with:
1721
fetch-depth: 0
22+
token: ${{ secrets.TOC_TOKEN }}
1823

1924
- name: Generate TOC
2025
uses: technote-space/toc-generator@v4
2126
with:
27+
GITHUB_TOKEN: ${{ secrets.TOC_TOKEN }}
2228
TOC_TITLE: "## Table of Contents"
2329
TARGET_PATHS: "group-syllabus/*.md"
2430
FOLDING: false
2531
CREATE_PR: true
32+
PR_BRANCH_NAME: "update-toc-${PR_ID}"
33+
PR_BRANCH_PREFIX: "toc-generator/"
34+
PR_TITLE: "docs: update TOC"
2635
COMMIT_MESSAGE: "Update TOC in markdown files"
2736
COMMIT_NAME: "GitHub Action"
2837
COMMIT_EMAIL: "action@github.com"

0 commit comments

Comments
 (0)