Skip to content

fix: use build artifacts for production deployment instead of rebuilding - #236

Merged
busla merged 1 commit into
mainfrom
002-fix-deploy-artifacts
Feb 17, 2026
Merged

fix: use build artifacts for production deployment instead of rebuilding#236
busla merged 1 commit into
mainfrom
002-fix-deploy-artifacts

Conversation

@busla

@busla busla commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The deploy-production job in push.yml was rebuilding all Sphinx documentation from scratch instead of using the validated output from the build-docs job
  • This caused deployed content to potentially differ from what CI validated, and wasted ~40% of workflow time
  • Fix passes build artifacts between jobs using upload-artifact@v4 / download-artifact@v4, eliminating the redundant build entirely

Changes

build-docs-optimized.yml

  • Added upload-artifact@v4 step for push deployments (uploads _build/ as production-build artifact)
  • Improved build failure tracking: failures are collected in a shared file and reported with ::warning:: annotations

push.yml

  • Replaced 60-line redundant build (conda setup + Sphinx rebuild) with 5-line artifact download
  • Deploy job now: download artifact → checkout edbook.github.io → rsync + push
  • No conda, no Python, no Sphinx needed in the deploy job

projects/forsida/index.rst

  • Added invisible HTML comment for deploy verification

Test plan

  • Push workflow builds docs once (not twice)
  • Build artifact production-build appears in workflow artifacts
  • Deploy job downloads artifact and rsyncs to edbook.github.io
  • Changes appear on edbook.hi.is
  • PR workflow still works (upload step gated by deployment_type == 'push')
  • Discord notifications still fire

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced build failure tracking with detailed error reporting and artifact collection for deployment pipelines.
    • Optimized deployment workflow to reduce build complexity and improve operational efficiency.
    • Added deployment verification mechanisms to ensure successful deployments.

The deploy-production job in push.yml was rebuilding all Sphinx docs from
scratch instead of using the validated output from the build-docs job.
This caused deployed content to potentially differ from what was validated,
and wasted ~40% of workflow time.

Changes:
- Add upload-artifact step in build-docs-optimized.yml for push deployments
- Replace redundant conda/Sphinx rebuild in push.yml with artifact download
- Add build failure tracking with GitHub Actions warning annotations
- Add deploy verification marker to forsida/index.rst

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@busla
busla requested a review from benediktmag as a code owner February 17, 2026 16:01
@busla
busla merged commit 36f5269 into main Feb 17, 2026
1 of 2 checks passed
@busla
busla deleted the 002-fix-deploy-artifacts branch February 17, 2026 16:02
@coderabbitai

coderabbitai Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

The PR refactors the documentation build and deployment workflow to improve artifact management. It introduces failure tracking in the optimized build process, adds artifact upload steps for production deployments, simplifies the push workflow to use pre-built artifacts instead of rebuilding, and includes a deployment verification marker.

Changes

Cohort / File(s) Summary
Build and Deployment Workflows
.github/workflows/build-docs-optimized.yml, .github/workflows/push.yml
Modified build-docs-optimized.yml to track build failures via a shared file, report failure summaries, and upload build artifacts. Simplified push.yml to download pre-built artifacts instead of rebuilding the entire Sphinx documentation pipeline, removing conda setup and environment configuration steps.
Deployment Verification
projects/forsida/index.rst
Added an HTML raw block with a deploy verification marker (deploy-verify: 002-fix-deploy-artifacts) at the end of the page for deployment tracking.

Sequence Diagram(s)

sequenceDiagram
    participant BuildJob as Build Job<br/>(build-docs-optimized)
    participant ArtifactStore as Artifact Storage
    participant PushJob as Push Job<br/>(push.yml)
    participant Deployment as Deployment
    
    BuildJob->>BuildJob: Build Sphinx docs<br/>with failure tracking
    BuildJob->>BuildJob: Collect failures<br/>to build_failures.txt
    BuildJob->>ArtifactStore: Upload _build artifacts
    BuildJob->>BuildJob: Generate failure<br/>summary report
    
    PushJob->>ArtifactStore: Download pre-built<br/>artifacts
    PushJob->>PushJob: Use artifacts<br/>instead of rebuilding
    PushJob->>Deployment: Prepare deployment<br/>structure
    PushJob->>Deployment: Deploy content
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • benediktmag
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 002-fix-deploy-artifacts

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@github-actions

Copy link
Copy Markdown

📚 PR Documentation Deployed

Your PR documentation is available with enhanced build performance:

🔗 PR Documentation: https://edbook.github.io/haskoli-islands/002-fix-deploy-artifacts/
🔗 Individual Projects: Available at https://edbook.github.io/haskoli-islands/002-fix-deploy-artifacts/[project-name]/

✨ Performance Features:

  • ⚡ Parallel builds (4x faster)
  • 💾 Intelligent caching
  • 🏗️ Optimized Sphinx configuration
  • 📊 Build statistics included

Version: 26.02.17.1602+a49600e

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