Merge pull request #86 from CloudCannon/feat/doc-overrides #286
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_call: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| - name: Install | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Build | |
| run: npm run build | |
| - name: Check documentation | |
| run: | | |
| if [ -n "$(git status --porcelain docs)" ]; then | |
| echo "::error::Build produced changes in docs/. Run 'npm run build' and commit the result." | |
| git status --porcelain docs | |
| git diff docs | |
| exit 1 | |
| fi | |
| - name: Unit Test | |
| run: npm run test |