Skip to content

docs: Fix docs build disk space failure - #391

Merged
ilyabo merged 2 commits into
mainfrom
docs--Fix-docs-build-disk-space-failure
Feb 26, 2026
Merged

ilyabo merged 2 commits into
mainfrom
docs--Fix-docs-build-disk-space-failure

Conversation

@ilyabo

@ilyabo ilyabo commented Feb 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores

    • Optimized deployment workflow with runner disk cleanup, media verification, and updated Node/environment setup to improve build reliability.
  • Documentation

    • Reworked documentation build into distinct API and site stages, added pre-build disk reclamation and clearer verification steps to make docs generation more robust and predictable.

@coderabbitai

coderabbitai Bot commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The PR updates the GitHub Actions deploy-docs workflow: replaces Git LFS setup with verification checks, adds runner disk cleanup and reporting steps, configures Node 24 with pnpm caching, and restructures/renames TypeDoc and VitePress documentation build steps.

Changes

Cohort / File(s) Summary
GitHub Actions workflow
.github/workflows/deploy-docs.yml
Replaced “Setup Git LFS” with verification (ls-files count + du -sh docs/media); added “Free disk space on runner” step that removes /usr/share/dotnet, /opt/ghc, /usr/local/lib/android and reports disk usage; added Setup Node (node-version: 24, cache: pnpm) and preserved pnpm install with run_install: false; renamed/clarified build steps: “Build packages” → “Build packages (required for TypeDoc module resolution)”, “Build docs” → “Build API docs (TypeDoc)” using pnpm run docs:clean && pnpm run docs:build:typedoc, added pre-VitePress reclaim step (pnpm run clean + disk checks), and renamed “Build docs site” → “Build docs site (VitePress)” with pnpm run docs:build:vitepress.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰
I nibbled bytes and cleared the way,
Removed the clutter, chewed cache today.
Docs now build with cleaner cheer,
More room to hop — the pipeline’s clear! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of the PR, which is to fix disk space failures in the documentation build workflow by adding disk management steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs--Fix-docs-build-disk-space-failure

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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/deploy-docs.yml (1)

38-50: Add a post-cleanup free-space guard to fail fast.

Cleanup errors are masked with || true; if space is still low, the workflow fails later during docs build. Add an explicit minimum free-space check right after cleanup.

Suggested guard
       - name: Free disk space on runner
         run: |
           echo "Before cleanup:"
           df -h
           df -i
           du -sh /usr/share/dotnet /opt/ghc /usr/local/lib/android 2>/dev/null || true

           sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android || true

           echo "After cleanup:"
           df -h
           df -i
           du -sh /usr/share/dotnet /opt/ghc /usr/local/lib/android 2>/dev/null || true
+          FREE_GB=$(df --output=avail -BG / | tail -1 | tr -dc '0-9')
+          if [ "${FREE_GB:-0}" -lt 10 ]; then
+            echo "Insufficient disk after cleanup: ${FREE_GB}G available"
+            exit 1
+          fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-docs.yml around lines 38 - 50, The "Free disk space
on runner" step currently masks cleanup failures with "|| true" and lacks a
post-cleanup guard; add a free-space check immediately after the removal
commands in that step (the same step block named "Free disk space on runner")
that measures available disk space (e.g., parse df output or use df
--output=avail) and exits with a non-zero status if free space is below a chosen
threshold (fail-fast with exit 1 and a clear error message) so the workflow
stops early instead of failing later during the docs build.
🤖 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/deploy-docs.yml:
- Around line 38-50: The "Free disk space on runner" step currently masks
cleanup failures with "|| true" and lacks a post-cleanup guard; add a free-space
check immediately after the removal commands in that step (the same step block
named "Free disk space on runner") that measures available disk space (e.g.,
parse df output or use df --output=avail) and exits with a non-zero status if
free space is below a chosen threshold (fail-fast with exit 1 and a clear error
message) so the workflow stops early instead of failing later during the docs
build.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7ba4f2 and d30a443.

📒 Files selected for processing (1)
  • .github/workflows/deploy-docs.yml

Signed-off-by: Ilya Boyandin <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 the current code and only fix it if needed.

Inline comments:
In @.github/workflows/deploy-docs.yml:
- Around line 33-37: The "Verify Git LFS media" step currently only lists and
sizes LFS files but doesn't materialize them; update that step (named "Verify
Git LFS media") to run an explicit git lfs pull (or git lfs pull --all if
needed) before running git lfs ls-files and du -sh docs/media so pointer files
are smudged into real content for downstream build steps.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d30a443 and c193cc8.

📒 Files selected for processing (1)
  • .github/workflows/deploy-docs.yml

Comment on lines +33 to +37
- name: Verify Git LFS media
run: |
git lfs install
git lfs pull
git lfs ls-files | wc -l
du -sh docs/media

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Examine the full workflow file to understand the context
cat -n .github/workflows/deploy-docs.yml

Repository: sqlrooms/sqlrooms

Length of output: 4418


🏁 Script executed:

# Search for any Git LFS related steps in the workflow
rg -i "lfs|git" .github/workflows/deploy-docs.yml -A 3 -B 1

Repository: sqlrooms/sqlrooms

Length of output: 1518


🏁 Script executed:

# Check if there's a previous version of this file in git
git log --oneline -n 20 -- .github/workflows/deploy-docs.yml

Repository: sqlrooms/sqlrooms

Length of output: 78


🌐 Web query:

actions/checkout@v6 lfs: true git lfs initialization behavior

💡 Result:

With actions/checkout@v6 and with: lfs: true, the action’s Git LFS behavior is essentially:

  1. Does not set GIT_LFS_SKIP_SMUDGE (that variable is set only when lfs is false, to prevent any automatic LFS smudging/download during checkout). [1]
  2. Runs git lfs install --local (initializes LFS in the repo by configuring the local filters/hooks). [2]
  3. (If NOT using sparse checkout) it pre-fetches LFS objects in parallel via git lfs fetch origin <ref> before the actual git checkout, explicitly to avoid the slower “fetch one object at a time during checkout” behavior. [3]
  4. It then performs the normal git checkout; there is no explicit git lfs pull or git lfs checkout step implemented by the action itself. [3]

Implications / common gotchas:

  • If your working tree still contains LFS pointer files, you may need to run git lfs checkout (or git lfs pull) yourself in a later step; users have reported this expectation mismatch. [4]
  • If another tool re-clones the repo (e.g., some Docker build actions using a remote git URL as build context), that separate clone won’t inherit the LFS results from actions/checkout. [5]

Sources:
[1] https://raw.githubusercontent.com/actions/checkout/main/dist/index.js (LFS skip-smudge logic)
[2] https://raw.githubusercontent.com/actions/checkout/main/dist/index.js (implements lfsInstall() as git lfs install --local)
[3] https://raw.githubusercontent.com/actions/checkout/main/dist/index.js (pre-checkout git lfs fetch, and no lfs checkout/pull call)
[4] actions/checkout#1019
[5] actions/checkout#270


🏁 Script executed:

# Search for any references to Git LFS in the repository
rg "git lfs" --type yaml --type md -i

Repository: sqlrooms/sqlrooms

Length of output: 592


Add explicit git lfs pull to materialize LFS files in this step.

The actions/checkout@v6 action with lfs: true initializes Git LFS and pre-fetches objects, but does not materialize pointer files. The "Verify Git LFS media" step must explicitly pull and smudge the files before the build steps depend on them, or pointer files may remain in the working tree instead of actual file contents.

Suggested patch
-      - name: Verify Git LFS media
+      - name: Setup and verify Git LFS media
         run: |
+          git lfs pull --include="docs/media/**"
           git lfs ls-files | wc -l
           du -sh docs/media
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Verify Git LFS media
run: |
git lfs install
git lfs pull
git lfs ls-files | wc -l
du -sh docs/media
- name: Setup and verify Git LFS media
run: |
git lfs pull --include="docs/media/**"
git lfs ls-files | wc -l
du -sh docs/media
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-docs.yml around lines 33 - 37, The "Verify Git LFS
media" step currently only lists and sizes LFS files but doesn't materialize
them; update that step (named "Verify Git LFS media") to run an explicit git lfs
pull (or git lfs pull --all if needed) before running git lfs ls-files and du
-sh docs/media so pointer files are smudged into real content for downstream
build steps.

@ilyabo
ilyabo merged commit 024d9e1 into main Feb 26, 2026
6 checks passed
@ilyabo
ilyabo deleted the docs--Fix-docs-build-disk-space-failure branch February 26, 2026 13:22
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.

1 participant