28 lines
862 B
YAML
28 lines
862 B
YAML
name: Check generated TOCs
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "README.md"
|
|
- "docs/BestPractices.md"
|
|
|
|
jobs:
|
|
doctoc:
|
|
name: Doc TOC Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2.1.2
|
|
with:
|
|
node-version: '12.x'
|
|
- name: Install doctoc
|
|
run: npm i -g doctoc
|
|
- name: Create README copy and diff with doctoc
|
|
run: cp README.md README.md.tmp &&
|
|
doctoc --title='## Table of Contents' --github README.md &&
|
|
diff -q README.md README.md.tmp
|
|
- name: Create "docs/BestPractices.md" copy and diff with doctoc
|
|
run: cp docs/BestPractices.md docs/BestPractices.md.tmp &&
|
|
doctoc --title='## Table of Contents' --github docs/BestPractices.md &&
|
|
diff -q docs/BestPractices.md docs/BestPractices.md.tmp
|