Skip to content

Commit

Permalink
feat: support bilingual toc title
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk committed Oct 9, 2024
1 parent 612382f commit bf58ca1
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Print modified files
run: |
echo "Modified files in the last commit:"
echo "${{ toJson(github.event.head_commit.modified) }}"
- name: Generate TOC for README.md
if: contains(github.event.head_commit.modified, 'README.md')
uses: technote-space/toc-generator@v4
with:
CREATE_PR: true
GITHUB_TOKEN: ${{ secrets.LIBRO_TOKEN }}
PR_TITLE: 'chore(docs): update TOC of readme'
path: README.md
title: '## Table of Contents'

- name: Generate TOC for README_zh.md
if: contains(github.event.head_commit.modified, 'README_zh.md')
uses: technote-space/toc-generator@v4
with:
path: README_zh.md
title: '## 目录'

0 comments on commit bf58ca1

Please sign in to comment.