@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8df523351f
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 05:15 UTC

[Docs] Only build docs if `documentation` or `ready` labels are present (#36135)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Harry Mellor committed Mar 5, 2026 at 13:58 UTC 8df523351f6e665ea5b07f1b731aa2449d197624
2 files changed +25
.readthedocs.yaml
+1
@@ -9,6 +9,7 @@ build:
9 python: "3.12"
10 jobs:
11 post_checkout:
12 + - bash docs/maybe_skip_pr_build.sh
13 - git fetch origin main --unshallow --no-tags --filter=blob:none || true
14 pre_create_environment:
15 - pip install uv
docs/maybe_skip_pr_build.sh new
+24
@@ -0,0 +1,24 @@
1 +#!/bin/bash
2 +# SPDX-License-Identifier: Apache-2.0
3 +# Skip PR builds unless the PR has the "documentation" or "ready" label.
4 +# Used by Read the Docs (see .readthedocs.yaml).
5 +
6 +if [[ "$READTHEDOCS_VERSION_TYPE" != "external" ]]; then
7 + exit 0
8 +fi
9 +
10 +PR_URL="https://api.github.com/repos/vllm-project/vllm/pulls/${READTHEDOCS_VERSION}"
11 +CURL_ARGS=(-s -o /tmp/pr_response.json -w "%{http_code}")
12 +if [[ -n "$GITHUB_TOKEN" ]]; then
13 + CURL_ARGS+=(-H "Authorization: token ${GITHUB_TOKEN}")
14 +fi
15 +HTTP_CODE=$(curl "${CURL_ARGS[@]}" "$PR_URL")
16 +
17 +if [[ "$HTTP_CODE" -ne 200 ]]; then
18 + echo "GitHub API returned HTTP ${HTTP_CODE}, proceeding with build."
19 +elif grep -qE '"name": *"(documentation|ready)"' /tmp/pr_response.json; then
20 + echo "Found required label, proceeding with build."
21 +else
22 + echo "PR #${READTHEDOCS_VERSION} lacks 'documentation' or 'ready' label, skipping build."
23 + exit 183
24 +fi