Skip to content

ci: remove obsolete documentation deployments - #1

Merged
ofek merged 1 commit into
mainfrom
feat/docs-deployment-retention
Oct 20, 2026
Merged

ofek merged 1 commit into
mainfrom
feat/docs-deployment-retention

Conversation

@ofek

@ofek ofek commented Oct 20, 2026

Copy link
Copy Markdown
Member

Intent

Keep the active documentation deployments without retaining historical sites or previews of closed pull requests.

Changes

Add a trusted, fixed-project cleanup workflow that keeps canonical production, currently serving open-PR aliases, and in-progress deployments. It removes superseded production and preview deployments, closed-PR previews, and legacy branch previews. The Worker can request a sweep after publication or PR closure; a ten-minute schedule recovers missed requests.

Cleanup independently resolves complete Cloudflare and GitHub state, refreshes candidates before deletion, and refuses incomplete metadata or ambiguous identities. Its workflow runs separately from publication, so cleanup failures do not change a verified publishing result. Current publishing validation and the operational production snapshot remain unchanged.

Validation

python -B -m unittest discover -s tests
................................................................................
----------------------------------------------------------------------
Ran 80 tests in 1.530s

OK
actionlint -no-color .github/workflows/publish.yml .github/workflows/ci.yml .github/workflows/cleanup.yml
Exit code: 0. No output.
zizmor --no-progress --format plain .github/workflows
 INFO zizmor: 🌈 zizmor v1.25.2
 INFO audit: zizmor: 🌈 completed .github/workflows\ci.yml
 INFO audit: zizmor: 🌈 completed .github/workflows\cleanup.yml
 INFO audit: zizmor: 🌈 completed .github/workflows\publish.yml
No findings to report. Good job! (6 suppressed)
git diff --check
Exit code: 0. No output.

Notes

Live Cloudflare pagination and retention qualification follows activation. Historical deployments removed by the sweep will no longer be available for rollback. The two providers do not expose an atomic cross-service state check; concurrent changes can defer cleanup to a later sweep. No reviewers were requested.

@ofek
ofek marked this pull request as ready for review October 20, 2026 22:45
@ofek
ofek merged commit 54d3aa4 into main Oct 20, 2026
1 check passed
@ofek
ofek deleted the feat/docs-deployment-retention branch October 20, 2026 22:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T22:47:31.888312Z 598e48a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 598e48aa35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/cleanup.py
Comment on lines +93 to +95
items = request_json(
self.prefix + "/pulls?" + query, self.token, github=True
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Revalidate each aliased PR without mutable pagination

When there are more than 100 open PRs and a PR from an already-read page closes during pagination, GitHub's page-number pagination shifts a later PR onto the previous page, so the next request skips it and this function returns an incomplete set as authoritative. sweep() then treats that still-open PR as closed and may force-delete its serving preview; the refresh before deletion calls the same pagination routine. Query the candidate PR directly before deleting its alias, or otherwise make omission during pagination fail closed.

Useful? React with 👍 / 👎.

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