Commit 2899c43
fix(site): auto-detect Cloudflare Pages build target
Cloudflare Pages' Git integration was building the site with the GitHub
Pages base path '/TermBeam', causing every internal link on
termbeam.pages.dev to 404 (and Cloudflare to fall back to a redirect to
the github.io copy).
astro.config.mjs now auto-detects CF builds via the CF_PAGES=1 env var
that Cloudflare sets during builds, switching to base '/' and using
CF_PAGES_URL for canonical/OG metadata. GitHub Pages builds remain
unchanged. Cloudflare's project just needs:
Root directory: packages/site
Build command: npm run build
Output directory: dist
Removes the redundant GH Actions Cloudflare workflow now that Cloudflare's
own Git integration handles deploys automatically.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 397fdcc commit 2899c43
2 files changed
Lines changed: 7 additions & 70 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | | - | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
0 commit comments