From afa7f0c45b7bddf5362bad244e6ba70a3ce13709 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 16:35:54 +0000 Subject: [PATCH 1/2] Static site (4): GitHub Pages deploy workflow and custom domain Add .github/workflows/pages.yml to build the Eleventy site plus the Pagefind index and publish to GitHub Pages, and a CNAME (github.blimacake.com) shipped in the built site. Deploys run on pushes to main that touch the site or recipes, and on manual dispatch. Add docs/site-deploy.md with the one-time owner setup (public repo, Pages source = GitHub Actions, DNS CNAME to jposluns.github.io, custom domain and HTTPS) and a note on moving the apex later. Verified: full npm run build produces the site, search index, sitemap, CNAME, and epub; workflow YAML is valid. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01HpG2vky2XhDtfc6y16TRis --- .github/workflows/pages.yml | 60 +++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 11 ++++++- docs/site-deploy.md | 52 ++++++++++++++++++++++++++++++++ eleventy.config.js | 3 ++ site/CNAME | 1 + 5 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pages.yml create mode 100644 docs/site-deploy.md create mode 100644 site/CNAME diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..35ad49f --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,60 @@ +name: pages + +# Builds the Eleventy site (with the Pagefind search index) and deploys it to +# GitHub Pages at github.blimacake.com. +# +# One-time setup by the owner before the first successful run (see +# docs/site-deploy.md): make the repo public, set Settings > Pages > Source to +# "GitHub Actions", and point the DNS CNAME for github.blimacake.com at +# jposluns.github.io. Until Pages is enabled, the deploy step will fail; that is +# expected. + +on: + push: + branches: [main] + paths: + - "site/**" + - "recipes/**" + - "eleventy.config.js" + - "package.json" + - "package-lock.json" + - "BlimaCake.epub" + - ".github/workflows/pages.yml" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + name: Build site + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: "npm" + - run: npm ci + - name: Build site and search index + run: npm run build + - uses: actions/upload-pages-artifact@v3 + with: + path: _site + + deploy: + name: Deploy to Pages + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index f6f20d6..eb5ae72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,16 @@ Recipe imports are logged both here (summary) and in ### Added -- **Static site: SEO and Recipe structured data (ADR 0003, PR 3 of the site phase).** +- **Static site: GitHub Pages deploy workflow and custom domain (ADR 0003, PR 4 of the + site phase).** Added [`.github/workflows/pages.yml`](.github/workflows/pages.yml), + which builds the Eleventy site and Pagefind index and publishes it to GitHub Pages, + and a `CNAME` (`github.blimacake.com`) shipped in the built site. Deploys run on + pushes to `main` that touch the site or recipes, and on manual dispatch. Added + [`docs/site-deploy.md`](docs/site-deploy.md) with the one-time owner setup (make the + repo public, set Pages source to GitHub Actions, DNS `CNAME` for + `github.blimacake.com` pointing at `jposluns.github.io`, custom domain and HTTPS) and + a note on moving the apex domain later. The deploy step needs Pages enabled first; + until then it will fail by design. Each recipe page now carries schema.org `Recipe` JSON-LD (name, author, category, ingredients, step-by-step instructions, keywords, yield, and image) so search engines can show rich results. Added canonical, Open Graph, and Twitter-card meta to diff --git a/docs/site-deploy.md b/docs/site-deploy.md new file mode 100644 index 0000000..a13d2db --- /dev/null +++ b/docs/site-deploy.md @@ -0,0 +1,52 @@ + +# Deploying the site to GitHub Pages + +The website is built from the Markdown by [`.github/workflows/pages.yml`](../.github/workflows/pages.yml) +and published to GitHub Pages at `github.blimacake.com`. This note lists the one-time +setup the owner does, and how deploys happen after that. + +## One-time setup + +1. **Make the repository public.** GitHub Pages needs a public repository on the free + plan. (Pages on a private repository requires a paid plan.) +2. **Turn on Pages with the Actions source.** In the repository, go to + **Settings > Pages > Build and deployment** and set **Source** to + **GitHub Actions**. Until this is done, the workflow's deploy step will fail; that + is expected. +3. **Point the DNS at GitHub.** At the DNS provider for `blimacake.com`, add one + record for the subdomain: + + | Field | Value | + | --- | --- | + | Type | `CNAME` | + | Host / Name | `github` (this makes `github.blimacake.com`) | + | Value / Target | `jposluns.github.io.` | + | TTL | provider default | + + The target is the GitHub Pages host for this account (`jposluns.github.io`), not the + repository. Some providers want the trailing dot on the target; others add it for + you. +4. **Set the custom domain in GitHub.** In **Settings > Pages > Custom domain**, enter + `github.blimacake.com` and save. The repository already ships a `CNAME` file in the + built site, so this field may already be filled in. Once the DNS has propagated, + tick **Enforce HTTPS** (the certificate can take up to about an hour to issue). + +## How deploys happen after setup + +- **Automatically** on every push to `main` that touches the site or the recipes + (`site/**`, `recipes/**`, the Eleventy config, `package*.json`, or the e-book). +- **Manually** at any time from the **Actions** tab: open the **pages** workflow and + choose **Run workflow**. + +Each run rebuilds the whole site and the Pagefind search index from the current +Markdown, so the published site always matches the archive. + +## Later: moving the apex domain + +When the WordPress site at `blimacake.com` retires and you want the bare +`blimacake.com` (not just the `github.` subdomain) to serve this archive, the apex +needs `A` (and `AAAA`) records pointing at GitHub's Pages addresses rather than a +`CNAME`. GitHub publishes the current Pages IP addresses in its documentation; confirm +them there at the time, since hosting addresses can change, and then set the custom +domain to `blimacake.com`. This is a separate step for later, not part of the initial +`github.blimacake.com` launch. diff --git a/eleventy.config.js b/eleventy.config.js index 0a0e190..171ccab 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -10,6 +10,9 @@ export default function (eleventyConfig) { eleventyConfig.addPassthroughCopy({ "assets/branding": "assets/branding" }); eleventyConfig.addPassthroughCopy({ "BlimaCake.epub": "BlimaCake.epub" }); + // Custom-domain marker for GitHub Pages (site/CNAME -> /CNAME). + eleventyConfig.addPassthroughCopy("site/CNAME"); + // Recipe photos, kept at the same relative path the pages reference. for (const ext of ["jpg", "jpeg", "png", "webp", "avif", "gif"]) { eleventyConfig.addPassthroughCopy(`recipes/**/images/*.${ext}`); diff --git a/site/CNAME b/site/CNAME new file mode 100644 index 0000000..d109758 --- /dev/null +++ b/site/CNAME @@ -0,0 +1 @@ +github.blimacake.com From 2bb951b5fcf215aeef534552f08d35d266650bc8 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 16:58:53 +0000 Subject: [PATCH 2/2] Switch site custom domain to new.blimacake.com Owner changed the subdomain from github.blimacake.com to new.blimacake.com. Update CNAME, the site canonical/OG/sitemap/robots base URL (site/_data/site.js), the pages workflow comment, the deploy doc (including the DNS host cell: new), and ADR 0003. Also restore the PR 3 CHANGELOG bullet header that was accidentally merged into the PR 4 entry. Rebuilt: CNAME, canonical, sitemap, and robots all use new.blimacake.com. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01HpG2vky2XhDtfc6y16TRis --- .github/workflows/pages.yml | 4 ++-- CHANGELOG.md | 10 ++++++---- docs/adr/0003-static-site-phase.md | 2 +- docs/site-deploy.md | 10 +++++----- site/CNAME | 2 +- site/_data/site.js | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 35ad49f..0bb9ad2 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,11 +1,11 @@ name: pages # Builds the Eleventy site (with the Pagefind search index) and deploys it to -# GitHub Pages at github.blimacake.com. +# GitHub Pages at new.blimacake.com. # # One-time setup by the owner before the first successful run (see # docs/site-deploy.md): make the repo public, set Settings > Pages > Source to -# "GitHub Actions", and point the DNS CNAME for github.blimacake.com at +# "GitHub Actions", and point the DNS CNAME for new.blimacake.com at # jposluns.github.io. Until Pages is enabled, the deploy step will fail; that is # expected. diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5ae72..8064115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,19 +16,21 @@ Recipe imports are logged both here (summary) and in - **Static site: GitHub Pages deploy workflow and custom domain (ADR 0003, PR 4 of the site phase).** Added [`.github/workflows/pages.yml`](.github/workflows/pages.yml), which builds the Eleventy site and Pagefind index and publishes it to GitHub Pages, - and a `CNAME` (`github.blimacake.com`) shipped in the built site. Deploys run on + and a `CNAME` (`new.blimacake.com`) shipped in the built site. Deploys run on pushes to `main` that touch the site or recipes, and on manual dispatch. Added [`docs/site-deploy.md`](docs/site-deploy.md) with the one-time owner setup (make the repo public, set Pages source to GitHub Actions, DNS `CNAME` for - `github.blimacake.com` pointing at `jposluns.github.io`, custom domain and HTTPS) and + `new.blimacake.com` pointing at `jposluns.github.io`, custom domain and HTTPS) and a note on moving the apex domain later. The deploy step needs Pages enabled first; until then it will fail by design. + +- **Static site: SEO and Recipe structured data (ADR 0003, PR 3 of the site phase).** Each recipe page now carries schema.org `Recipe` JSON-LD (name, author, category, ingredients, step-by-step instructions, keywords, yield, and image) so search engines can show rich results. Added canonical, Open Graph, and Twitter-card meta to every page (recipe pages use their own photo and an `article` type; other pages use the biscotti image). Added a generated `sitemap.xml` (507 URLs) and `robots.txt` - pointing at it. All absolute URLs use the `github.blimacake.com` domain. + pointing at it. All absolute URLs use the `new.blimacake.com` domain. - **Static site: full-text search (ADR 0003, PR 2 of the site phase).** Added a `/search/` page powered by [Pagefind](https://pagefind.app/), a static search index @@ -48,7 +50,7 @@ Recipe imports are logged both here (summary) and in warm theme in `site/assets/style.css`, and `_site/` to `.gitignore`. Verified: 487 recipe pages and 16 category pages build, all referenced photos copy (jpg, png, webp, avif, gif), and 0 broken internal links. Search (Pagefind), SEO/JSON-LD, and - the Pages deploy workflow with the `github.blimacake.com` domain follow in later + the Pages deploy workflow with the `new.blimacake.com` domain follow in later PRs. ADR 0003 moved to Accepted with the owner's decisions recorded. - **Automated e-book release workflow diff --git a/docs/adr/0003-static-site-phase.md b/docs/adr/0003-static-site-phase.md index 46bc2a7..f5f2b31 100644 --- a/docs/adr/0003-static-site-phase.md +++ b/docs/adr/0003-static-site-phase.md @@ -119,7 +119,7 @@ decisions below. The proposal is accepted. The open questions are resolved as follows: -1. **Domain.** Start on the subdomain `github.blimacake.com`. Once the WordPress site +1. **Domain.** Start on the subdomain `new.blimacake.com`. Once the WordPress site at blimacake.com retires, the apex domain will be redirected to the archive site. 2. **Search.** Use Pagefind (static, zero-maintenance full-text search). 3. **Theme.** A light custom theme in the spirit of blimacake.com. The landing page diff --git a/docs/site-deploy.md b/docs/site-deploy.md index a13d2db..f6e80ef 100644 --- a/docs/site-deploy.md +++ b/docs/site-deploy.md @@ -2,7 +2,7 @@ # Deploying the site to GitHub Pages The website is built from the Markdown by [`.github/workflows/pages.yml`](../.github/workflows/pages.yml) -and published to GitHub Pages at `github.blimacake.com`. This note lists the one-time +and published to GitHub Pages at `new.blimacake.com`. This note lists the one-time setup the owner does, and how deploys happen after that. ## One-time setup @@ -19,7 +19,7 @@ setup the owner does, and how deploys happen after that. | Field | Value | | --- | --- | | Type | `CNAME` | - | Host / Name | `github` (this makes `github.blimacake.com`) | + | Host / Name | `new` (this makes `new.blimacake.com`) | | Value / Target | `jposluns.github.io.` | | TTL | provider default | @@ -27,7 +27,7 @@ setup the owner does, and how deploys happen after that. repository. Some providers want the trailing dot on the target; others add it for you. 4. **Set the custom domain in GitHub.** In **Settings > Pages > Custom domain**, enter - `github.blimacake.com` and save. The repository already ships a `CNAME` file in the + `new.blimacake.com` and save. The repository already ships a `CNAME` file in the built site, so this field may already be filled in. Once the DNS has propagated, tick **Enforce HTTPS** (the certificate can take up to about an hour to issue). @@ -44,9 +44,9 @@ Markdown, so the published site always matches the archive. ## Later: moving the apex domain When the WordPress site at `blimacake.com` retires and you want the bare -`blimacake.com` (not just the `github.` subdomain) to serve this archive, the apex +`blimacake.com` (not just the `new.` subdomain) to serve this archive, the apex needs `A` (and `AAAA`) records pointing at GitHub's Pages addresses rather than a `CNAME`. GitHub publishes the current Pages IP addresses in its documentation; confirm them there at the time, since hosting addresses can change, and then set the custom domain to `blimacake.com`. This is a separate step for later, not part of the initial -`github.blimacake.com` launch. +`new.blimacake.com` launch. diff --git a/site/CNAME b/site/CNAME index d109758..48cfdd1 100644 --- a/site/CNAME +++ b/site/CNAME @@ -1 +1 @@ -github.blimacake.com +new.blimacake.com diff --git a/site/_data/site.js b/site/_data/site.js index 395c970..bdacab0 100644 --- a/site/_data/site.js +++ b/site/_data/site.js @@ -4,7 +4,7 @@ export default { description: "A home archive of Blima's recipes: cakes, cookies, breads, mains, and more, kept exactly as she made them.", // Set at deploy time via the custom domain; used for absolute links/SEO later. - url: "https://github.blimacake.com", + url: "https://new.blimacake.com", heroImage: "/assets/branding/biscotti_8074926357_o.jpg", epub: "/BlimaCake.epub", };