diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index d00e7fb3..83067a2e 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -5,14 +5,33 @@ on: - main - ximo_dev paths: - - 'README.md' # 只有 README.md 发生变化时触发name: TOC Generator + - README.md + - README_zh.md jobs: generateTOC: name: TOC Generator runs-on: ubuntu-latest steps: - - uses: technote-space/toc-generator@v4 + # - uses: technote-space/toc-generator@v4 + # with: + # CREATE_PR: true + # GITHUB_TOKEN: ${{ secrets.LIBRO_TOKEN }} + # PR_TITLE: 'chore(docs): update TOC of readme' + + - name: Generate TOC for README.md + uses: technote-space/toc-generator@v4 with: + TARGET_PATHS: README.md + TOC_TITLE: '## Table of Contents' + CREATE_PR: true + GITHUB_TOKEN: ${{ secrets.LIBRO_TOKEN }} + PR_TITLE: 'chore(docs): update TOC of readme' + + - name: Generate TOC for README_zh.md + uses: technote-space/toc-generator@v4 + with: + TARGET_PATHS: README_zh.md + TOC_TITLE: '## 目录' CREATE_PR: true GITHUB_TOKEN: ${{ secrets.LIBRO_TOKEN }} PR_TITLE: 'chore(docs): update TOC of readme'