Skip to content

docs: add PowerShell Pages deployment cleanup example#31756

Closed
AlexMnrs wants to merge 4 commits into
cloudflare:productionfrom
AlexMnrs:docs/pages-powershell-deployment-cleanup
Closed

docs: add PowerShell Pages deployment cleanup example#31756
AlexMnrs wants to merge 4 commits into
cloudflare:productionfrom
AlexMnrs:docs/pages-powershell-deployment-cleanup

Conversation

@AlexMnrs

Copy link
Copy Markdown

Summary

  • add tabs for the Pages deployment cleanup script
  • keep the existing macOS/Linux shell example
  • add a Windows PowerShell version that uses ConvertFrom-Json instead of jq

Closes #31753

Validation

  • git diff --check

Note: I attempted pnpm exec prettier --check src/content/docs/pages/platform/known-issues.mdx, but it timed out locally after the dependency install did not complete within two minutes. I stopped the stale local processes and did not keep generated dependency files.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ Rebase: Rebase skipped — cannot push to fork branches. The PR author must rebase locally.
⏸️ Automatic reviews for this PR are paused.

This PR has already received 2 automatic reviews. To run another review, a codeowner can comment /review or /full-review. To permanently lift the limit for this PR, a codeowner can comment /ignore-review-limit.

Tip: Keep PRs in draft mode until they are ready for review — the bot skips draft PRs automatically.


✅ No issues found in commit 5330e05.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

Checks PR title, description, and redirect checklist.

No convention issues found.

Style Guide Review

No style-guide issues found.

Redirects

No missing redirect entries found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.

AlexMnrs and others added 2 commits June 28, 2026 11:59
Replace both the macOS/Linux and Windows PowerShell examples with versions
that take the project name as an argument, detect the production deployment
via its Environment field, and delete preview deployments in parallel.
@MattieTK

Copy link
Copy Markdown
Member

I’ve reworked this a bit along with the shell script at the same time to catch the production env, throw if we don’t detect it, improve parallel deletion and use project name as an argument.

When no production deployment exists, the cleanup scripts now explain that one
is required and point to deploying to the production branch (with an example
wrangler command) instead of failing with a bare abort message.
@AlexMnrs

Copy link
Copy Markdown
Author

Thanks for tightening both examples, Mattie. The production-environment detection and clearer argument-based usage make the guide much stronger.

@github-actions

Copy link
Copy Markdown
Contributor

Hey there, we've marked this pull request as stale because there's no recent activity on it. This label helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant).

@github-actions github-actions Bot added the stale label Jul 20, 2026
@MattieTK

Copy link
Copy Markdown
Member

/rebase

@MattieTK
MattieTK enabled auto-merge (squash) July 21, 2026 08:57
@github-actions github-actions Bot removed the stale label Jul 22, 2026
@MattieTK

Copy link
Copy Markdown
Member

Moved to #32273 — pushing to this branch requires write access to your fork, which I don't have, so I opened the continuation from a branch on the main repo instead. Closing this one.

@MattieTK MattieTK closed this Jul 23, 2026
auto-merge was automatically disabled July 23, 2026 12:49

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Windows PowerShell alternative for "delete project with too many deployments" guide

7 participants