-
Notifications
You must be signed in to change notification settings - Fork 31
41 lines (35 loc) · 1016 Bytes
/
check-gen-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Check Generated Docs
on:
push:
branches:
- main
pull_request:
jobs:
check-gen-docs:
name: Check Generated Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install Dependencies
run: npm install
- name: Generate documentation
run: npm run docs:generate
- name: Ensure there are no un-committed changes to gen/docs folder
run: |
STATUS_ARGS=$1
PATHSPEC=$2
output=$(git status --porcelain $STATUS_ARGS $PATHSPEC)
if [[ -z "$output" ]];
then
echo "Clean"
echo "0"
else
echo "Please ensure you are regenerating documentation via 'npm run docs:generate' and have committted those changes. Changed files: $output"
echo "1"
fi