Merge pull request #530 from Open-Cap-Table-Coalition/jake/issue#373-… #632
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |