Skip to content

Delete the old deployments of the factoriotools Pages project #134

Open

Description

@wormeyman

Problem

The factoriotools Pages project was kept after the move to a Worker (#126) so that factoriotools-5jg.pages.dev can 301 to oilfieldplanner.factorygamefan.com. Only its production alias was replaced with the redirect stub (tools/pages-redirect-stub/_redirects).

Every earlier deployment is still live at its own <hash>.factoriotools-5jg.pages.dev address. Each one serves the full old site, with its old code and old headers. Cloudflare's docs say these hash addresses "are atomic and may always be visited in the future" (pages/configuration/preview-deployments.mdx). This is the same problem as the 265 live Worker preview URLs the editor found (factorio-blueprint-editor packages/worker/wrangler.jsonc).

This came out of the Cloudflare docs audit on 2026-10-05.

Fix

Run this from src/vue (where wrangler is installed), logged in to the account:

  1. List the deployments:
    npx wrangler pages deployment list --project-name factoriotools
  2. Keep the newest Production deployment, which is the redirect stub. Cloudflare will not delete it anyway: "The latest deployment for a branch cannot be deleted" (pages/configuration/api.mdx).
  3. Delete every other deployment:
    npx wrangler pages deployment delete <deployment-id> --project-name factoriotools --force
    --force is needed for any deployment that still has an alias.
  4. If a preview branch's latest deployment is a full build, it can't be deleted directly. Deploy the stub to that branch first, then delete the old one:
    npx wrangler pages deploy ../../tools/pages-redirect-stub --project-name factoriotools --branch <branch>

Done when

  • wrangler pages deployment list shows only stub deployments.
  • An old <hash>.factoriotools-5jg.pages.dev address from the list no longer serves the site.
  • https://factoriotools-5jg.pages.dev/ still 301s to https://oilfieldplanner.factorygamefan.com/, keeping the path.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions