Skip to content

X-ORG-3107: Publish API docs to docs.nvidia.com - #3108

Open
josephine-wolf-oberholtzer wants to merge 2 commits into
NVIDIA:mainfrom
josephine-wolf-oberholtzer:josephine/x-org-3107-publish-api-docs
Open

X-ORG-3107: Publish API docs to docs.nvidia.com#3108
josephine-wolf-oberholtzer wants to merge 2 commits into
NVIDIA:mainfrom
josephine-wolf-oberholtzer:josephine/x-org-3107-publish-api-docs

Conversation

@josephine-wolf-oberholtzer

Copy link
Copy Markdown
Contributor

Contributes to #3107

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added automated API documentation publishing for branch builds.
    • Added dry-run API documentation publishing for pull request validation.
    • Documentation publishing now supports version mapping for legacy and stable releases.

Walkthrough

Changes

API documentation publishing

Layer / File(s) Summary
Live API documentation publishing
.github/workflows/build.yaml
The build workflow adds a branch-only publish-api-docs job. The job invokes the shared publisher for raft with live publishing enabled and legacy/stable version mappings.
Pull request dry-run publishing
.github/workflows/pr.yaml
The pull request workflow adds a dependent publish-api-docs job. It invokes the shared publisher in dry-run mode and adds the job to pr-builder dependencies.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: gforsyth, jameslamb, bdice

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the change to publish API documentation to docs.nvidia.com.
Description check ✅ Passed The description references issue #3107, which the objectives associate with publishing API documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build.yaml:
- Around line 128-131: Update the publish-api-docs invocation in the
workflow_dispatch path to pass the checked-out build revision `${{ inputs.sha
}}` through the workflow’s supported sha/ref input, ensuring the publisher uses
the same revision as docs-build; alternatively prevent live publishing when the
revisions differ.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cbdbf21c-c0ac-4582-8f41-9410fe742979

📥 Commits

Reviewing files that changed from the base of the PR and between 24cd3b5 and ded2cf8.

📒 Files selected for processing (2)
  • .github/workflows/build.yaml
  • .github/workflows/pr.yaml

Comment on lines +128 to +131
uses: rapidsai/shared-workflows/.github/workflows/publish-api-docs.yaml@main
with:
docs-projects: raft
dry-run: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

publisher="$(curl -fsSL \
  https://raw.githubusercontent.com/rapidsai/shared-workflows/main/.github/workflows/publish-api-docs.yaml)"

grep -nE 'actions/checkout|ref:|Read VERSION|rapids-version-major-minor' <<<"${publisher}"
rg -n 'publish-api-docs|sha: \$\{\{ inputs\.sha \}\}' .github/workflows/build.yaml

Repository: NVIDIA/raft

Length of output: 1115


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- local workflow ---'
sed -n '95,140p' .github/workflows/build.yaml

printf '%s\n' '--- shared publisher workflow ---'
curl -fsSL \
  https://raw.githubusercontent.com/rapidsai/shared-workflows/main/.github/workflows/publish-api-docs.yaml |
  sed -n '1,180p'

Repository: NVIDIA/raft

Length of output: 7375


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow inputs and triggers ---'
sed -n '1,115p' .github/workflows/build.yaml

printf '%s\n' '--- documentation build script ---'
sed -n '1,220p' ci/build_docs.sh

printf '%s\n' '--- SHA and VERSION references ---'
rg -n 'inputs\.sha|github\.sha|VERSION|rapids-version-major-minor|workflow_dispatch|workflow_call' \
  .github/workflows/build.yaml ci/build_docs.sh

Repository: NVIDIA/raft

Length of output: 6637


🌐 Web query:

GitHub actions/checkout default ref reusable workflow workflow_call github.ref caller workflow documentation

💡 Result:

When using actions/checkout within a reusable workflow (triggered by workflow_call), the action defaults to checking out the caller's repository and the ref/SHA that triggered the caller workflow [1][2]. This occurs because, by design, reusable workflows run in the context of the caller, meaning the github context (repository, ref, sha, etc.) reflects the caller workflow, not the reusable workflow [1][3]. If you intend to check out the repository that contains the reusable workflow itself, you must explicitly configure the actions/checkout step to do so [4][5]. You can accomplish this by using the job context properties job.workflow_repository and job.workflow_sha [4]: - job.workflow_repository: The owner/repo of the repository containing the reusable workflow file [4]. - job.workflow_sha: The commit SHA of the reusable workflow file [4]. Example configuration to checkout the reusable workflow's repository: - uses: actions/checkout@v6 with: repository: ${{ job.workflow_repository }} ref: ${{ job.workflow_sha }} This ensures the checkout action pulls the specific version of the repository that defines the reusable workflow, rather than the caller's repository and ref [4][1].

Citations:


Pass the build SHA to the publisher.

During workflow_dispatch, docs-build checks out ${{ inputs.sha }}, but the publisher checks out the caller’s branch ref and reads its VERSION. Pass ${{ inputs.sha }} through a new sha or ref input, or block live publishing when the refs differ.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build.yaml around lines 128 - 131, Update the
publish-api-docs invocation in the workflow_dispatch path to pass the
checked-out build revision `${{ inputs.sha }}` through the workflow’s supported
sha/ref input, ensuring the publisher uses the same revision as docs-build;
alternatively prevent live publishing when the revisions differ.

Source: MCP tools

@josephine-wolf-oberholtzer

Copy link
Copy Markdown
Contributor Author

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants