The Check production availability GitHub workflow checks the public site at
minutes 7, 22, 37 and 52 of every hour. It uses Node 24 without installing
dependencies, deploying anything, or accessing Cloudflare credentials.
The checks cover the Astro home and download pages, a classic URL redirect
with its query string, the users archive, robots rules, the documentation
sitemap, latest and versioned reference URLs, and PDF headers plus a 16-byte
range. When the selected production DOC_REVISIONS entry is present, they also
check the modeling manual and its search JavaScript. Version and revision come
from workers/docs/wrangler.jsonc; update that configuration when promoting
documentation. Each run makes ten requests, or twelve with the modeling manual,
and caps each response read at 1 MB. It never downloads the complete PDF.
Transient failures get two retries, twenty seconds apart. Persistent failures fail the workflow and leave the failing path in its log. Check the failed path, the latest website and Worker deployments, and Cloudflare Workers logs. A version or revision mismatch can mean the checked-in promotion has not reached production yet. Use the deployment runbook for rollback; this workflow never changes traffic automatically.
From the website checkout:
node scripts/check-availability.mjs
gh workflow run availability.yml --repo Gecode/gecode.github.io --ref main
gh run list --repo Gecode/gecode.github.io --workflow availability.yml --limit 5Use scripts/docs/smoke-worker.mjs for the broader documentation checks after a
deployment. The scheduled checks deliberately use a smaller request set.
The responsible maintainer must enable GitHub Actions email or web notifications and select failed workflows only. Scheduled-run notifications go to the user who created or last changed the schedule, or who re-enabled it. Repository workflow success alone does not establish that anyone receives failure alerts. Confirm that maintainer's settings before relying on this workflow. See GitHub workflow notifications.
On 5 September 2026, the authenticated zayenz account's settings were checked:
Actions email notifications were enabled for failed workflows only. Keep that
account as the schedule owner, or verify the replacement owner's settings.
GitHub schedules can be delayed or dropped under load. Public-repository schedules are automatically disabled after sixty days without repository activity. Check that this workflow remains enabled during routine maintenance; re-enable it when necessary. This is a periodic availability check, with no guaranteed detection time, and cannot detect every regional or intermittent failure. See GitHub schedule limitations.
Cloudflare's budget notification remains separate from availability monitoring. A passive origin alert can complement these checks, but it does not cover every failure generated by the documentation Worker or R2. A Workers Observability notification also needs an actual alert rule; the notification destination alone does not monitor errors.
Since November 2026 the website no longer uses GitHub Pages. Cloudflare serves
everything under gecode.dev, and no origin certificate is involved:
www.gecode.devis a Workers Custom Domain ongecode-website, a Worker with static assets only (no script) built from_site. Its configuration isworkers/website/wrangler.jsonc.- More specific Worker routes on
wwwtake precedence over the Custom Domain:gecode-documentationowns/doc*and/robots.txt*, andgecode-classic-url-redirectsowns the classic.htmlURLs and/e/*. When they pass a request on withfetch(), it reaches the website Worker. _site/_redirects(generated byscripts/create-classic-redirects.mjs) sends/pageand/page.htmlto/page/with a 308._headersmarks the fingerprinted/_astro/*files as immutable.- The apex
gecode.devhas a proxied placeholder record (AAAA 100::) and a Single Redirect rule. The rule sends HTTP and HTTPS requests tohttps://www.gecode.dev/<path>with a 301 and keeps the query string. - Cloudflare Universal SSL issues and renews the edge certificates. The zone should use Full (strict); it has no external origin.
Static asset requests are free and unlimited on Workers Free, so the website does not count against the daily Worker request limit unless a route Worker runs first. A version may hold at most 20,000 files; the build has about 12,200, mostly the users archive.
A push to main runs .github/workflows/pages.yml ("Build and deploy
website"). It builds and checks the site, uploads the _site artifact, then
runs wrangler deploy --env production in the website-production
environment and finishes with scripts/check-availability.mjs. The
environment accepts only main and holds two secrets:
CLOUDFLARE_ACCOUNT_ID;CLOUDFLARE_API_TOKEN: the account tokengecode-website-deploy, created on 16 November 2026 without expiry. It has Workers Scripts Write and Account Settings Read on the Gecode account, and Zone Read and Workers Routes Write ongecode.dev. It cannot change DNS, SSL or rules.
The Custom Domain owns the www DNS record, so it does not appear as an
ordinary record in the DNS list. Cloudflare refuses to attach a Custom Domain
while another record exists for the hostname, and Wrangler does not replace it
in CI. If the domain is ever detached and must be reattached, delete any www
record and add the domain under Workers & Pages, gecode-website, Domains in
the same minute: resolvers may cache the missing name for 30 minutes.
The same build can be deployed by hand from the Workers workflow
(worker=website) to www-staging.gecode.dev or, with the
cloudflare-production approval, to production.
Every deploy creates a new Worker version. Roll back without rebuilding:
npx wrangler deployments list --name gecode-website
npx wrangler rollback --name gecode-website <version-id>Alternatively, rerun an earlier successful "Build and deploy website" run, or
in the dashboard choose Workers & Pages, gecode-website, Deployments.
Wrangler needs a token for the Gecode account; local OAuth login may only
cover a personal account.
The availability check fetches /news/ with a unique query string, so each
run reaches the deployed assets. It checks the apex redirect, and fails when
either edge certificate has fewer than 14 days left. Universal SSL normally
renews 30 days before expiry, so a failure means renewal is stuck.
GitHub Pages issued the original origin certificate in August 2026, before
Cloudflare proxied the domain. Pages cannot renew a certificate for a proxied
domain, because its eligibility check requires the records to resolve to
GitHub. The renewal stalled at bad_authz, and the certificate expired on
7 November. Cloudflare in Full (strict) mode then returned HTTP 526 for every
uncached page. Toggling the records to DNS only and re-adding the custom domain
did not clear the order. On 12 November the SSL mode was lowered to Full as a
stopgap. On 16 November the website moved to Workers Static Assets, the apex
moved to a Cloudflare redirect rule, and the GitHub Pages A records were
deleted.
The Cloudflare zone's Browser Cache TTL is set to Respect Existing Headers. Two active Cache Rules refine that default:
Cache immutable Astro assetsmatcheswww.gecode.dev/_astro/*, makes the response cache-eligible, and sets both edge and browser TTLs to one year.Cache website HTML and redirectsmatches the apex host and non-documentation website HTML paths onwww. It makes those responses cache-eligible, respects origin cache headers, and uses Cloudflare's status-code TTL when the origin sends no cache header.
Both rules were written for the GitHub Pages origin. Responses from the website
Worker's static assets do not go through the zone cache, so the Cache Rules no
longer affect them. Static assets
have their own edge caching, and _headers sets the browser policy. The two
rules can be removed once nothing depends on them.
Keep /doc* out of the website rule. The documentation Worker owns its cache
policy. The prepared Workers Cache change gives selected routes and aliases
thirty days of edge freshness plus seven days of stale-while-revalidate, while
browsers retain one-day freshness. Sitemaps and robots.txt retain five-minute
browser freshness. Explicit revisions retain a one-year
policy. See the Worker runbook for
the policy and staging checks. On 30 September 2026, the change was deployed to
staging from PR #13.
The updated staging deployment and smoke checks passed.
A fresh URL returned MISS, HIT, HIT with Cache-Control: public, max-age=86400.
An earlier probe confirmed one Worker execution for three requests. The smoke
check accepts native Workers Cache's 206 response to HEAD with Range and checks
plain HEAD separately. Production deployment remains subject to the protected
environment's approval. Short-TTL SWR and live revision rollback have not yet
been exercised against the native cache.
Ordinary zone caching runs after Worker routing. Workers Cache sits before execution, but its hits still count as Worker requests. Neither response headers nor a zone Cache Rule removes that request charge. Measure execution avoidance separately from billable requests and zone cache hits.
An external CDN can avoid Cloudflare requests on cache hits. A concrete option
is Fastly Full Site Delivery at www.gecode.dev, with documentation misses sent
to a dedicated Cloudflare Worker origin hostname and website misses sent to
the website Worker. This is a researched option, not a provisioned or tested service.
Use Fastly's Surrogate-Control header for the long edge TTL and SWR policy; Cloudflare's edge-only header does not configure Fastly. Enable origin shielding to share cache fills across locations. Tag mutable documentation responses and soft-purge those tags after release promotion or rollback. Deploying the Worker alone cannot invalidate the external cache.
Before switching public DNS, verify backend Host/TLS settings, public canonical
URLs and redirects, analytics injection and /e/ forwarding, query handling,
PDF ranges, SWR, and release invalidation on a preview hostname. Keep private
R2 access through the Worker. Do not point the CDN backend at its own public
hostname or expose the existing bucket's staging and manifest keys. Select the
provider and billing arrangement before provisioning this separate rollout.
The email Worker waits for every configured forward to finish and reports any forwarding failure. Native Worker logging is enabled; the handler does not log message bodies. Deploy it separately from the website and documentation:
gh workflow run workers.yml --repo Gecode/gecode.github.io --ref main \
-f operation=deploy -f environment=production -f worker=emailThe routing tests cover address selection and partial forwarding failure. They do not establish inbox delivery. Use Cloudflare Email Routing delivery analytics for that check; its zone-level Analytics Read permission is separate from the website deployment token. A failed availability run does not diagnose mail delivery, because the public HTTP checks exercise only the website.