forked from openvinotoolkit/nncf
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1.35 KB
/
build_schema_page.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Config schema HTML build
permissions: read-all
on:
workflow_call:
jobs:
build-config-schema-html:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: 3.10.14
- name: Install and Build
run: |
pip install json-schema-for-humans
pip install .
python -c 'import jstyleson; from nncf.config import NNCFConfig; jstyleson.dump(NNCFConfig.schema(), open("./schema.json", "w"), indent=2)'
mkdir -p schema
# In the current approach the line below will replace the schema/index.html generated by a
# phony schema/index.rst. We only need the phony schema/index.rst at the sphinx-build stage so that
# the sphinx can generate valid links in the TOC for the JSON schema across all pages.
generate-schema-doc --deprecated-from-description schema.json schema/index.html
- name: Archive built schema
shell: bash
run: tar -czf artifact.tar schema
- name: Upload result as artifact
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0
with:
name: schema_doc_artifact
path: artifact.tar