ci(docs): pull Git LFS assets before building docs#777
Conversation
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>
|
📝 Docs preview is not auto-deployed for fork PRs. A maintainer with write access to |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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-docsjob checks out withactions/checkout@v6, which defaults tolfs: false. So the working tree holds LFS pointer files (~131-byte text stubs), Sphinx copies them verbatim into_images/, andpeaceiris/actions-gh-pagespushes the stubs togh-pages. Browsers then receiveversion https://git-lfs.github.com/spec/v1 …instead of an image.Verified empirically:
preview/pr-776/_images/isaac-teleop-hero.jpgis served as a 131-byte pointer, and all 23 LFS-tracked docs images are pointers in the source tree. Productionmain/still renders only because that path is stale (last deployed before the migration, kept bykeep_files: true); the nextmaindocs 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: trueon thebuild-docscheckout — materializes the assets forcurrent-docs, which is exactly what PR previews deploy.git lfs fetch --allbeforemake multi-docs—lfs: trueonly 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-appis intentionally left unchanged:git ls-filesfinds no LFS-tracked raster images inwebxr_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'spull_requesttrigger runs from the PR branch, this PR itself (which touches.github/workflows/docs.yaml) exercises the edited workflow — confirm thatpreview/pr-<N>/_images/*.jpgserves binary rather than a pointer stub.Summary by CodeRabbit