Sample values #59
Workflow file for this run
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: JSON validation | |
on: | |
push: | |
branches: | |
- main | |
- beta | |
paths: | |
- 'docs/schema/*.json' | |
- 'docs/documentation.json' | |
- 'docs/_data/projects.json' | |
- 'generator/sonos-docs/templates/**/template.json' | |
- '.github/workflows/json-validation.yml' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
validate-docs: | |
name: Validate JSON files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Use node 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Install ajv-cli | |
run: npm i -g ajv-cli | |
- name: Validate docs/_data/projects.json | |
run: ajv validate -d ./docs/_data/projects.json -s ./docs/schema/projects.json -r ./docs/schema/author.json | |
- name: Validate docs/documentation.json | |
run: ajv validate -s ./docs/schema/documentation.json -d ./docs/documentation.json | |
- name: Validate template json files | |
run: ajv validate -s ./docs/schema/template.json -d "./generator/sonos-docs/templates/**/template.json" -r ./docs/schema/author.json |