Skip to content

chore(doc): update examples to include name for action #37

chore(doc): update examples to include name for action

chore(doc): update examples to include name for action #37

Workflow file for this run

name: Check ToC
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-toc.ya?ml"
- "README.md"
pull_request:
paths:
- ".github/workflows/check-toc.ya?ml"
- "README.md"
workflow_dispatch:
repository_dispatch:
jobs:
check:
name: ${{ matrix.file.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file:
- name: README.md
# Max ToC depth, for use with the markdown-toc --maxdepth flag.
maxdepth: 3
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install markdown-toc
run: sudo npm install --global markdown-toc
- name: Rebuild ToC
run: |
markdown-toc \
--bullets=- \
--maxdepth=${{ matrix.file.maxdepth }} \
-i \
"${{ github.workspace }}/${{ matrix.file.name }}"
- name: Check ToC
run: git diff --color --exit-code