Skip to content

chore(website): serve idct.tech/sticker-maker from a Cloudflare Worker - #111

Merged
bpacholek merged 1 commit into
mainfrom
website/cloudflare-worker
Sep 23, 2026
Merged

bpacholek merged 1 commit into
mainfrom
website/cloudflare-worker

Conversation

@bpacholek

Copy link
Copy Markdown
Contributor

Moves the marketing site from GitHub Pages to a Cloudflare Worker that holds only static assets. It uses the same setup as NUTS and Whaaack. Every URL stays the same: the site is still served at https://idct.tech/sticker-maker/.

How it works

  • website/wrangler.jsonc binds the Worker sticker-maker-site to two routes: idct.tech/sticker-maker and idct.tech/sticker-maker/*. Every other path on idct.tech still goes to the org's apex site on GitHub Pages, so DNS does not change.
  • workers_dev and preview_urls are off, so the site has no second copy at a workers.dev address.
  • not_found_handling: 404-page serves 404.html with a real 404 status at any depth.
  • The workflow (pages.yml, now named Site) builds with Jekyll as before and copies _site/ to _deploy/sticker-maker/, because the route keeps the prefix. It deploys with Wrangler pinned to 4.136.3, using the CLOUDFLARE_AUTHENTICATION_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets.
  • PRs still only build and validate. Only main deploys.

Guards

  • Before deploying: the build fails if any URL other sites already point at is missing: home, features, privacy, terms, contact, and the contact form's thank-you page.
  • After deploying: the workflow fetches /sticker-maker/ and /sticker-maker/privacy from the live site. The privacy URL is spelled exactly as about_data.dart spells it, so the redirect is checked too. Both must come from Cloudflare (no x-github-request-id header) and must match this build byte for byte. It retries for about a minute.

Tested locally

  • The Jekyll output has the same 21 files as today's build, and wrangler.jsonc is not published. The only content change is the privacy hosting paragraph.
  • wrangler deploy --dry-run accepts the config and maps both routes onto _deploy/sticker-maker.
  • wrangler dev returns the same result as GitHub Pages for every page, slashless path, asset and missing URL. Differences:
    • Slashless paths (/privacy → /privacy/) redirect with 307 instead of 301. Same target, and the same behaviour Whaaack has.
    • …/index.html redirects to the clean URL instead of serving a duplicate.
    • A 404 three levels deep renders the styled page, and all its assets resolve.
  • The post-deploy check passes against the local Worker, and fails against today's GitHub-served site as it should.
  • dart format, flutter analyze and flutter test (461) all pass. No Dart files changed.

Worth knowing

  • Email addresses will no longer be obfuscated. The zone's Email Address Obfuscation currently rewrites bartosz@idct.tech on pages proxied from GitHub. It does not apply to Worker-served assets: Whaaack's /auth/ page is served byte-identical with its address in plain text. After this change, the contact, privacy, terms and thank-you pages show a plain mailto: link.
  • The privacy policy's website section now names Cloudflare as the host instead of GitHub, and is dated 23 September 2026. Please give the new wording a quick read.
  • GitHub Pages stays enabled, as it did for NUTS and Whaaack. Once the routes are live, it's unreachable at this path. Deleting the Worker's routes would make idct.tech fall back to the last Pages deploy, which makes rollback straightforward.

🤖 Generated with Claude Code

The site stays at https://idct.tech/sticker-maker/ - the address the app's
About screen, the Play listing and the contact form's Web3Forms redirect all
point at. A Worker holding nothing but the built site is bound to that path by
two routes (website/wrangler.jsonc); every other path on idct.tech carries on
through the same proxied records to the org's apex site on GitHub, so DNS does
not change. Same shape as the NUTS and Whaaack migrations.

The workflow still builds on every PR and deploys only from main. It now
copies _site/ to _deploy/sticker-maker/ and deploys it with a pinned Wrangler
using the CLOUDFLARE_AUTHENTICATION_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets.
Then it fetches the live home page and the privacy URL, spelled exactly as the
app spells it (no trailing slash, so the redirect is covered too), and checks
both came from Cloudflare and match the build byte for byte. The no-CNAME
guard went with GitHub Pages. In its place, the build fails if any URL the
outside world holds (home, features, privacy, terms, contact, thank-you) goes
missing.

The privacy policy names Cloudflare as the host in GitHub's place, and its
website section is dated today.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bpacholek
bpacholek merged commit d0fac57 into main Sep 23, 2026
2 checks passed
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