docs: resolve repository links in legacy Sphinx output

Signed-off-by: zhifu gao <[email protected]>
This commit is contained in:
zhifu gao
2026-09-06 15:20:07 +00:00
parent efe4cb3c84
commit c75338c995
5 changed files with 389 additions and 1 deletions
+28
View File
@@ -5,6 +5,9 @@ on:
paths:
- 'README*.md'
- 'docs/**/*.md'
- 'docs/conf.py'
- 'docs/_ext/**'
- 'tests/test_sphinx_links.py'
- 'model_zoo/**/*.md'
- 'runtime/**/*.md'
- 'examples/openai_api/**/*.md'
@@ -20,6 +23,9 @@ on:
paths:
- 'README*.md'
- 'docs/**/*.md'
- 'docs/conf.py'
- 'docs/_ext/**'
- 'tests/test_sphinx_links.py'
- 'model_zoo/**/*.md'
- 'runtime/**/*.md'
- 'examples/openai_api/**/*.md'
@@ -34,6 +40,28 @@ permissions:
contents: read
jobs:
legacy-docs-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install documentation dependencies
run: >-
python -m pip install -r web-pages/product-site/requirements-site.txt
Sphinx==9.1.0 docutils==0.22.4 recommonmark==0.7.1
nbsphinx==0.9.8 sphinx-rtd-theme==3.1.0 sphinx-markdown-tables==0.0.17
- name: Check legacy document links without skips
run: |
python -m pytest tests/test_sphinx_links.py -q --junitxml=/tmp/sphinx-links.xml
python - <<'PY'
import xml.etree.ElementTree as ET
report = ET.parse('/tmp/sphinx-links.xml').getroot()
assert list(report.iter('testcase')), 'No Sphinx link tests ran'
assert not list(report.iter('skipped')), 'Sphinx link tests must not be skipped'
PY
build-and-validate:
runs-on: ubuntu-latest
steps: