Skip to content

Commit 71dce28

Browse files
committed
Add doctoc check
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
1 parent 34f502c commit 71dce28

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
jobs:
99
test-and-build:
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [10.x, 12.x]
14+
1115
steps:
1216
- uses: actions/checkout@v2
1317

@@ -19,10 +23,29 @@ jobs:
1923
${{ runner.os }}-node-
2024
2125
- uses: actions/setup-node@v2
26+
name: Use Node.js ${{ matrix.node-version }}
2227
with:
23-
node-version: '12'
28+
node-version: ${{ matrix.node-version }}
2429
check-latest: true
2530

2631
- run: npm ci
2732
- run: npm run test:ci
2833
- run: npm run build
34+
35+
doctoc:
36+
needs: test-and-build
37+
runs-on: ubuntu-latest
38+
if: github.ref == 'refs/heads/master' || github.event.pull_request
39+
40+
steps:
41+
- uses: actions/setup-node@v2
42+
name: Use Node.js 12
43+
with:
44+
node-version: 12
45+
check-latest: true
46+
- name: Install doctoc-check
47+
run: |
48+
npm install -g doctoc
49+
cp README.md README.md.orig
50+
npm run doctoc
51+
diff -q README.md README.md.orig

0 commit comments

Comments
 (0)