Skip to content

Commit

Permalink
chore: add github action to verify docs are up to date (#1745)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah authored Jan 15, 2021
1 parent 3bfbdd6 commit 77a1a1e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/verify-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Verify Docs

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [14.x]
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install core dependencies
run: npm ci
- name: Install site dependencies
run: npm run site:build:install
- name: Generate docs
run: npm run docs
- name: Check for changes
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to docs files detected"
else
echo "Changes to docs files detected, please run 'npm run docs' to sync docs"
exit 1
fi
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ We actively welcome your pull requests.
1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
4. Run `npm test` to run linting, formatting and tests.
5. Make sure to sync the docs by running `npm run docs`.

## Releasing

Expand Down

0 comments on commit 77a1a1e

Please sign in to comment.