|
| 1 | +# Website Deployment |
| 2 | + |
| 3 | +## Goal |
| 4 | + |
| 5 | +The new `website/` directory is the docs and marketing site for Bub. |
| 6 | + |
| 7 | +Legacy MkDocs source files may still exist in the repository during the |
| 8 | +transition, but production deployment now targets the Astro site on |
| 9 | +Cloudflare Pages. |
| 10 | + |
| 11 | +## Cloudflare Pages |
| 12 | + |
| 13 | +Connect the repository to a Cloudflare Pages project with Git integration. |
| 14 | + |
| 15 | +Recommended settings: |
| 16 | + |
| 17 | +- Production branch: `main` |
| 18 | +- Root directory: `website` |
| 19 | +- Build command: `pnpm install --frozen-lockfile && pnpm build` |
| 20 | +- Build output directory: `dist` |
| 21 | +- Environment variable: `SITE_URL=https://bub.build` |
| 22 | +- Environment variable: `NODE_VERSION=22.16.0` |
| 23 | + |
| 24 | +The repo also includes [wrangler.jsonc](./wrangler.jsonc) so local preview and |
| 25 | +Cloudflare Pages runtime settings stay aligned: |
| 26 | + |
| 27 | +- `pages_build_output_dir = "./dist"` |
| 28 | +- `compatibility_flags = ["nodejs_compat"]` |
| 29 | + |
| 30 | +Production deployment is driven by GitHub release automation instead of |
| 31 | +push-based auto deploys. |
| 32 | + |
| 33 | +## Current Repo State |
| 34 | + |
| 35 | +The local developer entrypoints now target the new site: |
| 36 | + |
| 37 | +- `just docs` |
| 38 | +- `just docs-test` |
| 39 | +- `just docs-preview` |
| 40 | + |
| 41 | +The CI docs check also builds `website/` instead of MkDocs. |
| 42 | + |
| 43 | +## GitHub Actions Deployment |
| 44 | + |
| 45 | +The deployment split is intentionally simple: |
| 46 | + |
| 47 | +- `main.yml` only verifies that the website builds |
| 48 | +- `on-release-main.yml` deploys production when a GitHub release is published |
| 49 | + |
| 50 | +Required repository configuration: |
| 51 | + |
| 52 | +- GitHub Actions secret: `CLOUDFLARE_API_TOKEN` |
| 53 | +- GitHub Actions secret: `CLOUDFLARE_ACCOUNT_ID` |
| 54 | +- GitHub Actions variable: `CLOUDFLARE_PAGES_PROJECT_NAME` |
| 55 | + |
| 56 | +## Cutover Later |
| 57 | + |
| 58 | +Once the Cloudflare Pages project is live and verified, the remaining cleanup |
| 59 | +work is: |
| 60 | + |
| 61 | +1. remove legacy MkDocs source files once they are no longer needed |
| 62 | +2. update repository docs that still describe the old docs toolchain |
0 commit comments