Repository navigation
Website: deploy to Cloudflare Workers instead of Netlify - #110
Closed
tuanphungcz wants to merge 1 commit into
Closed
tuanphungcz wants to merge 1 commit into
tuanphungcz wants to merge 1 commit into
Conversation
The site is served as Worker static assets, which read public/_headers and public/_redirects as before. website/worker.ts takes over both edge functions: the 301s to canonical URLs and the Markdown versions of pages. CI deploys main with wrangler and uploads every PR as a preview version under the alias pr-<number>.
🔎 Website previewhttps://pr-110-useanimations.tuan7822.workers.dev Updated for commit 6297ee5. |
Collaborator
Author
|
Staying on Netlify: the domain's DNS stays at the registrar, which Cloudflare Workers can't serve without its nameservers. |
This branch was successfully deployed
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.
useanimations.com moves from Netlify to Cloudflare Workers (static assets + a small Worker).
wrangler.jsonc: the Workeruseanimations, assets fromwebsite/dist, custom domainuseanimations.com.website/worker.ts: replaces both Netlify edge functions (301s to canonical URLs, Markdown versions of pages forAccept: text/markdown). It runs only for page paths (run_worker_first); icon files come straight from the assets.public/_headersandpublic/_redirectsstay; Cloudflare reads the same format. The!suffixes and the/iconsrewrite are gone (Cloudflare servesicons.htmlat/iconsitself).maindeploys withwrangler deploy; every PR uploads a preview version under the aliaspr-<number>and comments its URL.wwwandreact.useanimations.comredirect to the apex with a Redirect Rule on the zone.The site goes live on Cloudflare once the domain's nameservers at the registrar are switched to
apollo.ns.cloudflare.comandnola.ns.cloudflare.com.