From d9e12ad1669b0e91eb20fb63bc22d6aaa03708b8 Mon Sep 17 00:00:00 2001 From: Miyoung Choi Date: Wed, 18 Mar 2026 11:38:42 -0700 Subject: [PATCH] ci: add docs build workflow for PRs --- .github/workflows/docs.yaml | 42 +++++++++++++++++++++++++++++++++++++ Makefile | 5 ++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 00000000000..8e1cd1806f2 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +name: docs + +on: + pull_request: + types: [opened, synchronize, reopened] + paths: + - "docs/**" + - "pyproject.toml" + - "uv.lock" + - ".github/workflows/docs.yaml" + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: Install doc dependencies + run: uv sync --group docs + + - name: Build docs (strict) + run: uv run --group docs sphinx-build -W -b html docs docs/_build/html diff --git a/Makefile b/Makefile index 50e5a96326e..7eaf3c64a56 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: check lint format lint-ts lint-py format-ts format-py docs docs-live docs-clean +.PHONY: check lint format lint-ts lint-py format-ts format-py docs docs-strict docs-live docs-clean check: lint-ts lint-py @echo "All checks passed." @@ -24,6 +24,9 @@ format-py: docs: uv run --group docs sphinx-build -b html docs docs/_build/html +docs-strict: + uv run --group docs sphinx-build -W -b html docs docs/_build/html + docs-live: uv run --group docs sphinx-autobuild docs docs/_build/html --open-browser