forked from openvinotoolkit/nncf
-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (24 loc) · 1.01 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
name: Config schema HTML build
on:
workflow_call:
jobs:
build-config-schema-html:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- 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: Upload result as artifact
uses: alehechka/upload-tartifact@v2
with:
name: schema_doc_artifact
path: schema