Repository navigation
chore(website): serve idct.tech/sticker-maker from a Cloudflare Worker - #111
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsoncbinds the Workersticker-maker-siteto two routes:idct.tech/sticker-makerandidct.tech/sticker-maker/*. Every other path onidct.techstill goes to the org's apex site on GitHub Pages, so DNS does not change.workers_devandpreview_urlsare off, so the site has no second copy at a workers.dev address.not_found_handling: 404-pageserves404.htmlwith a real 404 status at any depth.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 to4.136.3, using theCLOUDFLARE_AUTHENTICATION_TOKENandCLOUDFLARE_ACCOUNT_IDsecrets.maindeploys.Guards
/sticker-maker/and/sticker-maker/privacyfrom the live site. The privacy URL is spelled exactly asabout_data.dartspells it, so the redirect is checked too. Both must come from Cloudflare (nox-github-request-idheader) and must match this build byte for byte. It retries for about a minute.Tested locally
wrangler.jsoncis not published. The only content change is the privacy hosting paragraph.wrangler deploy --dry-runaccepts the config and maps both routes onto_deploy/sticker-maker.wrangler devreturns the same result as GitHub Pages for every page, slashless path, asset and missing URL. Differences:/privacy→/privacy/) redirect with 307 instead of 301. Same target, and the same behaviour Whaaack has.…/index.htmlredirects to the clean URL instead of serving a duplicate.dart format,flutter analyzeandflutter test(461) all pass. No Dart files changed.Worth knowing
bartosz@idct.techon 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 plainmailto:link.🤖 Generated with Claude Code