ci: parallelize locale deploy builds#137
Conversation
📝 WalkthroughWalkthroughThe deploy-docs workflow gains a ChangesParallel Locale Build Pipeline
Sequence Diagram(s)sequenceDiagram
participant Config as docusaurus.config.js
participant Planner as plan-locale-chunks
participant Prep as prepare-docs-source
participant Matrix as build-locale-chunk (N runners)
participant Assembler as assemble-and-deploy
Planner->>Config: parse locales array
Config-->>Planner: [en, fr, de, ...]
Planner-->>Matrix: chunk list via GITHUB_OUTPUT
Prep-->>Matrix: prepared-docs-source artifact
Matrix->>Matrix: npx docusaurus build --locale <chunk locales>
Matrix-->>Assembler: docs-build-<chunk> artifact
Assembler->>Assembler: rsync merge all chunks into build/
Assembler->>Assembler: assert build/index.html exists
Assembler->>Assembler: deploy site
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/deploy-docs.yml:
- Around line 112-119: The plan-locale-chunks job is missing an if condition
that prevents it from running unnecessarily on scheduled events. Add an if
condition to the plan-locale-chunks job that matches the skip condition already
implemented in the prepare-docs-source and build-locale-chunk jobs. This will
ensure the job only runs when appropriate and avoids wasting CI minutes on
scheduled events when no changes are detected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 007c9f39-5514-469d-8b0f-8bd1c72c5882
📒 Files selected for processing (2)
.github/workflows/deploy-docs.yml.github/workflows/validate-docs.yml
| # ── Locale chunk planning ──────────────────────────────────────────────────── | ||
| plan-locale-chunks: | ||
| needs: check-changes | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| chunks: ${{ steps.plan.outputs.chunks }} | ||
| steps: | ||
| - uses: actions/checkout@v6 |
There was a problem hiding this comment.
Missing if condition causes unnecessary job execution.
Unlike prepare-docs-source and build-locale-chunk, this job lacks the skip condition. It will run even on scheduled events when changed=false, wasting CI minutes. Add the same condition for consistency:
plan-locale-chunks:
needs: check-changes
+ if: needs.check-changes.outputs.changed == 'true' || github.event_name != 'schedule'
runs-on: ubuntu-latest📝 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.
| # ── Locale chunk planning ──────────────────────────────────────────────────── | |
| plan-locale-chunks: | |
| needs: check-changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| chunks: ${{ steps.plan.outputs.chunks }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # ── Locale chunk planning ──────────────────────────────────────────────────── | |
| plan-locale-chunks: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.changed == 'true' || github.event_name != 'schedule' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| chunks: ${{ steps.plan.outputs.chunks }} | |
| steps: | |
| - uses: actions/checkout@v6 |
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 119-119: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 119-119: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/deploy-docs.yml around lines 112 - 119, The
plan-locale-chunks job is missing an if condition that prevents it from running
unnecessarily on scheduled events. Add an if condition to the plan-locale-chunks
job that matches the skip condition already implemented in the
prepare-docs-source and build-locale-chunk jobs. This will ensure the job only
runs when appropriate and avoids wasting CI minutes on scheduled events when no
changes are detected.
Summary
Verification
aidevops.sh v3.20.86 plugin for OpenCode v1.17.7 with gpt-5.5 Merged via PR #137 to main. |
Summary
deploy-docs.ymlto the validation workflow trigger paths so future deploy workflow changes run PR validation.Verification
python3YAML parse for.github/workflows/deploy-docs.ymland.github/workflows/validate-docs.ymlgit diff --checkDOCUSAURUS_EXIT_AFTER_LOADING=true npx docusaurus build --locale en --locale uznpx docusaurus build --locale en --locale uznpx docusaurus build --locale uz --locale viNote: local Docusaurus builds completed successfully with existing broken-link/anchor warnings.
aidevops.sh v3.20.86 plugin for OpenCode v1.17.7 with gpt-5.5
Summary by CodeRabbit