-
-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (42 loc) · 1.35 KB
/
toc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
# Copied from: rasa/dotfiles/.github/workflows/toc.yml
# EDIT THE ABOVE FILE, NOT THIS COPY, OR YOUR CHANGES WILL BE LOST!
# $schema https://json.schemastore.org/github-workflow.json
name: toc
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main
- master # @TODO remove
paths:
- "**/*.md"
push:
paths:
- "**/*.md"
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
job:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
GH_TOC_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: USES actions/[email protected]
uses: actions/[email protected]
with:
show-progress: false
- name: RUN gh-md-toc
run: |
curl -fsSL --output gh-md-toc https://raw.githubusercontent.com/ekalinin/github-markdown-toc/HEAD/gh-md-toc
chmod a+x gh-md-toc
find . -type f -iname '*.md' -exec ./gh-md-toc --indent 0 --no-backup --hide-footer --skip-header {} \;
rm -f gh-md-toc
true
- name: USES stefanzweifel/[email protected]
uses: stefanzweifel/[email protected]
with:
commit_message: "docs: auto update table-of-contents in markdown"
# cSpell:ignore stefanzweifel