Skip to content

fix: prevent docs deployment from being cancelled - #735

Merged
ooples merged 2 commits into
masterfrom
fix/docs-no-cancel
Jan 20, 2026
Merged

ooples merged 2 commits into
masterfrom
fix/docs-no-cancel

Conversation

@ooples

@ooples ooples commented Jan 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes documentation deployment which has never successfully completed due to multiple issues.

Issues Fixed

1. "No space left on device" error
The Ubuntu runner runs out of disk space while building DocFX docs and Blazor Playground. Added a cleanup step that removes ~20GB+ of pre-installed software we don't need:

  • Old .NET versions (6.x, 7.x)
  • Android SDK (~14GB)
  • GHC (Haskell)
  • CodeQL
  • Chromium
  • PowerShell

2. Job dependency causing cancellation (already fixed but kept the note)
The needs: build-windows dependency was removed so the docs job can run independently in its own concurrency group.

Changes

  1. Added "Free up disk space" step that removes unused pre-installed software
  2. Removed needs: build-windows dependency from build-docs job
  3. Added explanatory comments

After this merge

The next push to master should successfully deploy:

Test plan

  • Merge this PR
  • Check workflow run shows disk space before/after cleanup
  • Verify Build & Deploy Documentation job completes successfully
  • Check https://ooples.github.io/AiDotNet/ is accessible

Generated with Claude Code

Remove 'needs: build-windows' dependency from build-docs job so it
starts immediately and runs in its own concurrency group (pages).

The issue was that when multiple commits are pushed to master quickly,
the main workflow's cancel-in-progress: true setting would cancel the
entire workflow before build-docs could complete. Since build-docs has
its own concurrency group with cancel-in-progress: false, removing the
dependency allows it to run independently and complete even when the
main workflow is cancelled by a newer commit.

The docs job builds from source anyway, so it doesn't need build-windows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 20, 2026 15:40
@coderabbitai

coderabbitai Bot commented Jan 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Documentation build and deployment now run independently, improving release cadence and reducing coupling with other platform builds.
  • Chores
    • Improved deployment controls and permissions for safer publishing.
    • Added disk cleanup early in the docs workflow to reduce pipeline failures and increase reliability.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Decoupled the build-docs job from build-windows, added explicit permissions, concurrency/group "pages" with cancel-in-progress: false, an environment block for github-pages, and a pre-checkout disk cleanup step plus explanatory comments in the .github/workflows/sonarcloud.yml workflow.

Changes

Cohort / File(s) Summary
CI workflow — sonarcloud
.github/workflows/sonarcloud.yml
Removed needs: build-windows for build-docs; added permissions (contents: read, pages: write, id-token: write), concurrency (group: "pages", cancel-in-progress: false), and environment: github-pages; retained deployment steps.
CI workflow — docs prep step
.github/workflows/sonarcloud.yml
Introduced preparatory "Free up disk space" step (disk cleanup removing large preinstalled packages) placed before checkout; added explanatory comments clarifying independent docs flow and cleanup rationale.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 I hopped the workflow fence at dawn, delighted and spry,
Docs freed from Windows—now they soar through the sky.
I cleared a small burrow, made room on the run,
Pages march to deploy under a warm GitHub sun. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: preventing docs deployment cancellation by removing the build-windows dependency and adding independent concurrency control.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the issues fixed (disk space and job dependency), changes made, and test plan.
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 fix/docs-no-cancel

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.

Copilot AI 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.

Pull request overview

This PR fixes an issue where documentation deployment was consistently being cancelled due to workflow concurrency settings. When multiple commits are pushed to master quickly, the workflow's cancel-in-progress: true setting causes newer runs to cancel older ones, preventing the documentation job from completing.

Changes:

  • Removed the needs: build-windows dependency from the build-docs job to allow it to run independently
  • Added explanatory comments documenting why the job doesn't need to wait for the build-windows job

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add step to remove pre-installed software that's not needed for docs:
- Old .NET versions (6.x, 7.x)
- Android SDK
- GHC (Haskell)
- CodeQL
- Chromium
- PowerShell

This frees up ~20GB+ of disk space to prevent "no space left on device"
errors during the documentation build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ooples
ooples merged commit 5564a9a into master Jan 20, 2026
9 of 10 checks passed
@ooples
ooples deleted the fix/docs-no-cancel branch January 20, 2026 15:51
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