Skip to content

ci(docs): pull Git LFS assets before building docs#777

Merged
jiwenc-nv merged 1 commit into
NVIDIA:mainfrom
jiwenc-nv:jiwenc/fix-docs-lfs-preview
Jul 15, 2026
Merged

ci(docs): pull Git LFS assets before building docs#777
jiwenc-nv merged 1 commit into
NVIDIA:mainfrom
jiwenc-nv:jiwenc/fix-docs-lfs-preview

Conversation

@jiwenc-nv

@jiwenc-nv jiwenc-nv commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

Fixes #756. Docs images broke on the deployed site — most visibly on PR previews such as https://nvidia.github.io/IsaacTeleop/preview/pr-776/ — after #669 moved images into Git LFS (merged 2026-06-12).

The build-docs job checks out with actions/checkout@v6, which defaults to lfs: false. So the working tree holds LFS pointer files (~131-byte text stubs), Sphinx copies them verbatim into _images/, and peaceiris/actions-gh-pages pushes the stubs to gh-pages. Browsers then receive version https://git-lfs.github.com/spec/v1 … instead of an image.

Verified empirically: preview/pr-776/_images/isaac-teleop-hero.jpg is served as a 131-byte pointer, and all 23 LFS-tracked docs images are pointers in the source tree. Production main/ still renders only because that path is stale (last deployed before the migration, kept by keep_files: true); the next main docs deploy would overwrite it with pointers.

The muzimuzhi symlink/tarring theory in the issue does not apply here — that failure mode is specific to native GitHub Pages artifact deploys, whereas this repo pushes real files via actions-gh-pages.

Fix

  • lfs: true on the build-docs checkout — materializes the assets for current-docs, which is exactly what PR previews deploy.
  • git lfs fetch --all before make multi-docslfs: true only fetches HEAD's objects, but sphinx-multiversion checks out each ref (main, release/*, v* tags) into its own worktree, so those refs' LFS objects must be in the local cache to smudge real files.

build-app is intentionally left unchanged: git ls-files finds no LFS-tracked raster images in webxr_client, and its SVG icons are explicitly LFS-excluded in .gitattributes.

Verification

Workflow edits are only fully provable via a CI run. Since docs.yaml's pull_request trigger runs from the PR branch, this PR itself (which touches .github/workflows/docs.yaml) exercises the edited workflow — confirm that preview/pr-<N>/_images/*.jpg serves binary rather than a pointer stub.

Summary by CodeRabbit

  • Documentation
    • Improved documentation builds to include the correct media assets across all published documentation versions.
    • Resolved issues where images and other large files could appear as missing or invalid placeholders.

Images, GIFs, SVGs, and PDFs are stored in Git LFS (see .gitattributes),
but the build-docs checkout used the default lfs: false, so Sphinx copied
LFS pointer files verbatim into the site. The deployed docs — including PR
previews (e.g. preview/pr-776/) — then served pointer stubs instead of
images.

Set lfs: true on the build-docs checkout to materialize the assets, and
run git lfs fetch --all before make multi-docs so sphinx-multiversion's
per-ref worktrees smudge real files for every built version.

Fixes NVIDIA#756

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview is not auto-deployed for fork PRs.

A maintainer with write access to NVIDIA/IsaacTeleop can deploy a preview by
commenting /preview-docs on this PR. Once deployed, the preview
will live at:

https://nvidia.github.io/IsaacTeleop/preview/pr-777/

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c40795cb-4a6f-4a5c-ad5a-f32d97353315

📥 Commits

Reviewing files that changed from the base of the PR and between a6d606e and 8e381bd.

📒 Files selected for processing (1)
  • .github/workflows/docs.yaml

📝 Walkthrough

Walkthrough

The build-docs workflow checkout now enables Git LFS, ensuring documentation packaging receives actual media files. Before multi-version documentation generation, the workflow also runs git lfs fetch --all to retrieve LFS objects for all processed refs.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main workflow change: fetching Git LFS assets before the docs build.
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.

@jiwenc-nv
jiwenc-nv enabled auto-merge (rebase) July 15, 2026 03:48
@jiwenc-nv
jiwenc-nv merged commit 2a04d8f into NVIDIA:main Jul 15, 2026
46 checks passed
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.

images no longer works for the docs preview page

3 participants