Repository navigation
Serve the website from Cloudflare Workers static assets - #16
Merged
Merged
Conversation
Add an assets-only Worker for the Astro site, with a staging Custom Domain and a production Custom Domain on www.gecode.dev, and a website option in the edge Worker deployment workflow.
Replace the classic meta-refresh fallback pages with _redirects rules, cache fingerprinted Astro assets for a year through _headers, and drop the GitHub Pages CNAME file.
Pushes to main now deploy the built site to the gecode-website Worker in the website-production environment and then run the availability check. The check covers the apex redirect and edge certificate expiry instead of the GitHub Pages origin certificate.
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.
GitHub Pages cannot renew its certificate while Cloudflare proxies the domain. Its expiry on 7 November caused the HTTP 526 outage. This PR moves the website onto Cloudflare so that no origin certificate is involved.
workers/website/wrangler.jsonc: the assets-only Workergecode-websiteon thewww.gecode.devCustom Domain. The staging copy is onwww-staging.gecode.dev. The existing/doc*,/robots.txt*,/e/*and classic.htmlroute Workers keep precedence, and their pass-through reaches this Worker./pageand/page.htmlURLs now come from a generated_redirectsfile (308) instead of meta-refresh pages._headersmarks/_astro/*as immutable.CNAMEis gone.pages.yml: pushes tomainbuild the site, deploy it with Wrangler in thewebsite-productionenvironment, then run the availability check.docs/operations.mddescribes the setup, deployment, rollback and the November incident.Already done in Cloudflare:
www, with a proxiedAAAA 100::record. The GitHub A records are deleted.gecode-website-deployis stored inwebsite-production.Staging was checked on
www-staging.gecode.dev. Wrangler replaces thewwwCNAME when the merge deploys to production.