feat(web): migrate hosting to Cloudflare Pages#205
Merged
Conversation
Removes Firebase Hosting and Google Cloud Build wiring now that Cloudflare Pages is the production host (preview live at aixgo.pages.dev). Adds web/static/_headers with the cache policy ported from firebase.json -- with one fix: CSS/JS no longer carry the immutable directive because Hugo doesn't fingerprint those filenames by default, and Firebase Hosting was relying on its own edge-purge behavior to invalidate stale browser caches. Cloudflare Pages doesn't auto-purge user CDN/browser caches the same way, so without this fix returning users could see stale assets for up to a year after a deploy. Brand images at root keep the long immutable cache (they rarely change). Updates CLAUDE.md to document the new deployment path and required env vars (HUGO_VERSION, HUGO_POSTHOG_KEY, HUGO_POSTHOG_HOST). The Firebase rewrite "** -> /404.html" is intentionally not ported; Cloudflare Pages serves /404.html with HTTP 404 natively, which is better SEO than the HTTP 200 the rewrite produced.
The govet inline analyzer flags reflect.Ptr as a deprecated alias. reflect.Pointer was introduced in Go 1.18 as the preferred name and both constants share the same underlying value, so this is a pure rename. Without the change, golangci-lint blocks merges on every file that still references reflect.Ptr (10 occurrences across 4 files; the run reports only 3 due to the default max-same-issues=3 cap).
Deploying aixgo with
|
| Latest commit: |
0a8a12d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://597611db.aixgo.pages.dev |
| Branch Preview URL: | https://feat-web-cloudflare-pages-mi.aixgo.pages.dev |
4 tasks
charlesgreen
added a commit
that referenced
this pull request
May 3, 2026
The Hugo source for aixgo.dev now lives at https://github.com/aixgo-dev/web. Cloudflare Pages auto-deploys from there; aixgo.dev verified live and serving from the new project (PostHog beacon firing, DNS unchanged). Removes: - web/ (entire 127-file Hugo source tree, ~34k lines) - .github/workflows/website.yml (stale Firebase deploy; production was already on Cloudflare Pages with auto-build, this workflow had been failing on every push since PR #205 removed Firebase auth) Updates: - CLAUDE.md: replace 60-line Website section with one-line stub linking to the new repo; fix anchor in TOC - Makefile: drop web-* delegation targets - README.md: replace "web/ source code" references with links to aixgo-dev/web; add aixgo-dev/aixgate to the Resources block - .gitleaks.toml: drop web/content/examples/ allowlist path Net: -34,696 / +8 lines. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
charlesgreen
added a commit
that referenced
this pull request
May 3, 2026
The Hugo source for aixgo.dev now lives at https://github.com/aixgo-dev/web. Cloudflare Pages auto-deploys from there; aixgo.dev verified live and serving from the new project (PostHog beacon firing, DNS unchanged). Removes: - web/ (entire 127-file Hugo source tree, ~34k lines) - .github/workflows/website.yml (stale Firebase deploy; production was already on Cloudflare Pages with auto-build, this workflow had been failing on every push since PR #205 removed Firebase auth) Updates: - CLAUDE.md: replace 60-line Website section with one-line stub linking to the new repo; fix anchor in TOC - Makefile: drop web-* delegation targets - README.md: replace "web/ source code" references with links to aixgo-dev/web; add aixgo-dev/aixgate to the Resources block - .gitleaks.toml: drop web/content/examples/ allowlist path Net: -34,696 / +8 lines. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
charlesgreen
added a commit
that referenced
this pull request
May 3, 2026
The Hugo source for aixgo.dev now lives at https://github.com/aixgo-dev/web. Cloudflare Pages auto-deploys from there; aixgo.dev verified live and serving from the new project (PostHog beacon firing, DNS unchanged). Removes: - web/ (entire 127-file Hugo source tree, ~34k lines) - .github/workflows/website.yml (stale Firebase deploy; production was already on Cloudflare Pages with auto-build, this workflow had been failing on every push since PR #205 removed Firebase auth) Updates: - CLAUDE.md: replace 60-line Website section with one-line stub linking to the new repo; fix anchor in TOC - Makefile: drop web-* delegation targets - README.md: replace "web/ source code" references with links to aixgo-dev/web; add aixgo-dev/aixgate to the Resources block - .gitleaks.toml: drop web/content/examples/ allowlist path Net: -34,696 / +8 lines. Co-authored-by: Claude Opus 4.7 (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.
Summary
Migrates
aixgo.devhosting to Cloudflare Pages. Preview verified live ataixgo.pages.dev.Changes
web/static/_headers— cache-control rules for Cloudflare Pages.web/firebase.json,web/.firebaserc,web/cloudbuild.yaml).CLAUDE.mddeployment section to reflect Cloudflare Pages and the required env vars (HUGO_VERSION,HUGO_POSTHOG_KEY,HUGO_POSTHOG_HOST).reflect.Ptr→reflect.Pointeracross 4 Go files. govet's inline analyzer flags the deprecated alias and was blocking CI on this PR (and any other PR touching the repo).Cache policy
/css/*and/js/*:max-age=3600, must-revalidate. CSS/JS aren't fingerprinted yet, so we want browsers to revalidate. If we add Hugoresources.Fingerprintlater, fingerprinted assets can move to long-cache +immutable./aixgo-logo.pngand/favicon.svg:max-age=31536000, immutable— rarely change.404 behavior
No
_redirectsfile needed — Cloudflare Pages serves/404.htmlwith HTTP 404 natively.Test plan
cd web && make build— Hugo builds clean.web/public/_headerscontains the right rules.go build ./...— compiles after thereflect.Pointerrename._headersare applied —curl -I https://aixgo.dev/css/main.cssshould showcache-control: public, max-age=3600, must-revalidate.curl -I https://aixgo.dev/this-does-not-existshould return HTTP 404.HUGO_POSTHOG_KEYset in Cloudflare Pages env vars, confirm a pageview reaches PostHog fromaixgo.devpost-cutover.