Skip to content

Commit

Permalink
Check auto-generated docs for changes (#17)
Browse files Browse the repository at this point in the history
* new check-docs.yaml workflow

* make check-docs.yaml a valid workflow

* fix README
  • Loading branch information
alehechka authored Apr 11, 2023
1 parent 2f16db8 commit 532da87
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
check-dist:
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
path:
- 'determine-environment'
Expand All @@ -28,7 +28,7 @@ jobs:
- 'get-package-version'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/check-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check generated docs

on:
pull_request:
workflow_dispatch:

jobs:
check-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm install --prefer-offline --frozen-lockfile

- name: Regenerate all READMEs
run: npm run docs

- name: Compare the expected and actual READMEs
run: |
if [ "$(git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi

0 comments on commit 532da87

Please sign in to comment.