Skip to content

Feat json schema (#1) #3

Feat json schema (#1)

Feat json schema (#1) #3

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
pull_request:
branches: [main]
permissions:
pages: write
id-token: write
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install check-jsonschema
- name: Validate examples
run: check-jsonschema --schemafile schema.json examples/*/data.json
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: validate
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install json-schema-for-humans
- name: Build site
run: |
mkdir build
generate-schema-doc schema.json build/index.html
cp schema.json build/
cp -r examples/*/ build/
- uses: actions/upload-pages-artifact@v3
with:
path: build/
- id: deployment
uses: actions/deploy-pages@v4