Skip to content

Make a document preview for PRs#1101

Merged
shengliangxu merged 3 commits intomainfrom
shengliangx/docs-preview
Mar 23, 2026
Merged

Make a document preview for PRs#1101
shengliangxu merged 3 commits intomainfrom
shengliangx/docs-preview

Conversation

@shengliangxu
Copy link
Contributor

@shengliangxu shengliangxu commented Mar 23, 2026

What does this PR do?

Make a document preview for PRs

Make it much easier for reviewing changes on docs.

Summary by CodeRabbit

  • Chores
    • Improved documentation deployment pipeline with enhanced pull request lifecycle handling.
    • Optimized artifact management for documentation builds across multiple trigger events.
    • Streamlined deployment process for documentation to the hosting platform with better preview management.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 23, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 23, 2026

📝 Walkthrough

Walkthrough

The GitHub Actions workflow now supports PR preview deployments alongside main documentation deployment. Pull request trigger types were expanded for lifecycle handling, permissions were modified, docs artifact upload switched from pages-specific to standard artifact upload, and a new preview deployment job using pr-preview-action was added with per-PR concurrency control.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/pages.yml
Expanded pull_request trigger types for granular preview handling; modified permissions from pages-specific to contents/pull-requests; changed docs artifact from pages artifact to standard artifact upload; added new deploy-preview job with per-PR concurrency for PR preview deployments; updated deploy-gh-pages to use github-pages-deploy-action instead of deploy-pages with artifact downloads and preservation of pr-preview subdirectories.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Make a document preview for PRs' directly and clearly summarizes the main objective of the pull request, which is to add a document preview feature for pull requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Security Anti-Patterns ✅ Passed PR modifies only .github/workflows/pages.yml, a GitHub Actions workflow with no Python code, so security check for modelopt package Python changes is not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch shengliangx/docs-preview

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-03-23 20:15 UTC

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.23%. Comparing base (b61fb4e) to head (30a2736).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1101      +/-   ##
==========================================
- Coverage   70.24%   70.23%   -0.02%     
==========================================
  Files         227      227              
  Lines       25909    25909              
==========================================
- Hits        18201    18198       -3     
- Misses       7708     7711       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Make it much easier for reviewing changes on docs.

Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
…he pages preview logic

Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
@shengliangxu shengliangxu force-pushed the shengliangx/docs-preview branch from 86ff8bd to 8ddaec5 Compare March 23, 2026 17:42
@shengliangxu shengliangxu force-pushed the shengliangx/docs-preview branch 2 times, most recently from 95ef9fa to 8ddaec5 Compare March 23, 2026 19:50
@shengliangxu shengliangxu marked this pull request as ready for review March 23, 2026 19:51
@shengliangxu shengliangxu requested a review from a team as a code owner March 23, 2026 19:51
@shengliangxu shengliangxu enabled auto-merge (squash) March 23, 2026 19:55
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/pages.yml (1)

46-50: Consider skipping ubuntu-setup on closed events for faster cleanup.

The ubuntu-setup action runs even when github.event.action == 'closed', but it's only needed for building docs. Since the build is already skipped on closed events, you could also skip the setup step to reduce cleanup time.

♻️ Proposed optimization
       - uses: actions/checkout@v6
-      - uses: ./.github/actions/ubuntu-setup
+      - uses: ./.github/actions/ubuntu-setup
+        if: github.event.action != 'closed'
       - name: Build docs
         if: github.event.action != 'closed'
         run: pip install tox && tox -e build-docs
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pages.yml around lines 46 - 50, The ubuntu-setup action is
executed unconditionally even when the Build docs step is skipped; update the
workflow so the ./.github/actions/ubuntu-setup step (the step currently listed
alongside actions/checkout@v6) uses the same conditional (if:
github.event.action != 'closed') as the "Build docs" step to prevent running
setup on closed events and speed up cleanup.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/pages.yml:
- Around line 46-50: The ubuntu-setup action is executed unconditionally even
when the Build docs step is skipped; update the workflow so the
./.github/actions/ubuntu-setup step (the step currently listed alongside
actions/checkout@v6) uses the same conditional (if: github.event.action !=
'closed') as the "Build docs" step to prevent running setup on closed events and
speed up cleanup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d2b38d70-1346-484d-b80f-e8df58bb29f9

📥 Commits

Reviewing files that changed from the base of the PR and between b61fb4e and 30a2736.

📒 Files selected for processing (1)
  • .github/workflows/pages.yml

@shengliangxu shengliangxu merged commit 356c002 into main Mar 23, 2026
36 checks passed
@shengliangxu shengliangxu deleted the shengliangx/docs-preview branch March 23, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants