chore(ci): update PR preview workflows to clean up on close - #1191
chore(ci): update PR preview workflows to clean up on close#1191KumarNirupam1 wants to merge 2 commits into
Conversation
Signed-off-by: Kumar Nirupam <kumar.nirupam24@gmail.com>
|
Warning Review limit reached
Next review available in: 45 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe documentation preview workflows now handle closed pull requests. The build workflow uploads metadata without rebuilding preview content. The deploy workflow removes the preview and updates the pull request comment. ChangesDocumentation preview lifecycle
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant PullRequest
participant BuildWorkflow
participant DeployWorkflow
participant PreviewAction
participant PullRequestComment
PullRequest->>BuildWorkflow: closed event
BuildWorkflow->>DeployWorkflow: upload PR metadata
DeployWorkflow->>PreviewAction: remove preview
DeployWorkflow->>PullRequestComment: report preview removal
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
🚀 Preview deployment: https://docs.layer5.io/pr-preview/pr-1191/
|
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/build-docs-preview.yml:
- Line 98: Update the artifact upload flow around the path expression to retain
public for closed pull requests while excluding the empty public/ directory from
uploaded files. Use an upload or filtering step that skips public only when the
PR is closed, preserving pr/ as the artifact root and ensuring uploads do not
fail when public/ has no files.
🪄 Autofix
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 Plus
Run ID: bf8a97f1-df81-44f9-acac-14dbad078484
📒 Files selected for processing (2)
.github/workflows/build-docs-preview.yml.github/workflows/deploy-docs-preview.yml
Signed-off-by: Kumar Nirupam <kumar.nirupam24@gmail.com>
Notes for Reviewers
This PR fixes the missing preview cleanup on PR close in the layer5io/docs preview workflows.
What changed
The PR preview workflows previously did nothing when a pull request was closed — the preview stayed on gh-pages until the retention prune removed it, and no comment was posted. This aligns the workflows with the audit checklist:
Why step-level gating
Gating individual steps (rather than the whole job) keeps the build workflow run completing as a success on close, so the workflow_run deploy still triggers and the cleanup/comment actually run.
Checklist
Signed commits
Summary by CodeRabbit