Skip to content

Commit 532da87

Browse files
authored
Check auto-generated docs for changes (#17)
* new check-docs.yaml workflow * make check-docs.yaml a valid workflow * fix README
1 parent 2f16db8 commit 532da87

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/check-dist.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
check-dist:
2020
runs-on: ubuntu-latest
2121
strategy:
22-
fail-fast: true
22+
fail-fast: false
2323
matrix:
2424
path:
2525
- 'determine-environment'
@@ -28,7 +28,7 @@ jobs:
2828
- 'get-package-version'
2929

3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3232

3333
- name: Set Node.js 16.x
3434
uses: actions/setup-node@v3

.github/workflows/check-docs.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Check generated docs
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
check-docs:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Set Node.js 16.x
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16.x
18+
cache: npm
19+
cache-dependency-path: package-lock.json
20+
21+
- name: Install dependencies
22+
run: npm install --prefer-offline --frozen-lockfile
23+
24+
- name: Regenerate all READMEs
25+
run: npm run docs
26+
27+
- name: Compare the expected and actual READMEs
28+
run: |
29+
if [ "$(git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
30+
echo "Detected uncommitted changes after build. See status below:"
31+
git diff
32+
exit 1
33+
fi

0 commit comments

Comments
 (0)