From 43c68cfd5f1de9978caada1b01a1ca46c388e485 Mon Sep 17 00:00:00 2001 From: Tyrone Marhguy Date: Sat, 15 Aug 2026 10:53:04 -0400 Subject: [PATCH 1/3] docs: document Namecheap DNS so GitHub Pages can resolve --- web/README.md | 18 ++++++++++++++++-- web/tests/site-sanity.mjs | 6 ++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/web/README.md b/web/README.md index ee5c9f3..d4f6caa 100644 --- a/web/README.md +++ b/web/README.md @@ -132,8 +132,22 @@ cd web && npm test ## Deployment - **Live origin:** [tomato.tmarhguy.com](https://tomato.tmarhguy.com/) -- **GitHub Pages:** Publishes `web/` with `CNAME` set to `tomato.tmarhguy.com`. `.nojekyll` keeps underscored directories from being ignored. -- **Vercel:** The root `vercel.json` serves `web/` directly and runs `npm test` as the build command. Zero framework installation required. +- **GitHub Pages (authority):** `.github/workflows/pages.yml` publishes `web/` on push to `main`. `CNAME` is `tomato.tmarhguy.com`. `.nojekyll` keeps underscored directories from being ignored. +- **Vercel:** Optional mirror. The root `vercel.json` serves `web/` and runs `npm test` as the build. Do **not** point `tomato.tmarhguy.com` at Vercel — that hostname is the Pages custom domain (`alu.tmarhguy.com` is the Vercel site). + +### Custom domain DNS (Namecheap) + +`tmarhguy.com` is on Namecheap BasicDNS (`pdns1.registrar-servers.com`). GitHub Pages 301s `tmarhguy.github.io/tomato/` to `tomato.tmarhguy.com`. If this CNAME is missing, **both** URLs look dead (`InvalidDNSError` in Pages settings). + +In Namecheap → Domain List → `tmarhguy.com` → Advanced DNS, add: + +| Type | Host | Value | TTL | +|------|------|-------|-----| +| CNAME | `tomato` | `tmarhguy.github.io.` | Automatic | + +No A record on `tomato`. Do not CNAME it to `cname.vercel-dns.com`. + +Then in the repo: **Settings → Pages**. Wait until the DNS check is green, then enable **Enforce HTTPS**. GitHub already has a cert for this hostname. --- diff --git a/web/tests/site-sanity.mjs b/web/tests/site-sanity.mjs index 2b4b8fa..a90a929 100644 --- a/web/tests/site-sanity.mjs +++ b/web/tests/site-sanity.mjs @@ -18,6 +18,7 @@ const WEB = resolve(__dirname, ".."); const REQUIRED = [ "index.html", "404.html", + "CNAME", ".nojekyll", "css/magazine.css", "css/viewer.css", @@ -106,6 +107,11 @@ test("required deploy files exist", () => { } }); +test("Pages CNAME is tomato.tmarhguy.com", () => { + const cname = readFileSync(join(WEB, "CNAME"), "utf8").trim(); + assert.equal(cname, "tomato.tmarhguy.com"); +}); + test("HTML documents have basics", () => { for (const file of htmlFiles()) { const html = readFileSync(file, "utf8"); From 5638f2e0eed746b9df5648f53091a52e57be7a3d Mon Sep 17 00:00:00 2001 From: Tyrone Marhguy Date: Sat, 15 Aug 2026 15:06:34 -0400 Subject: [PATCH 2/3] chore: publish web/ from Pages instead of the repo README --- .github/workflows/pages.yml | 8 +++++++- CNAME | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 CNAME diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 60ccb45..f332b4f 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -37,9 +37,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Confirm payload is web/ (not the repo root README) + run: | + test -f web/index.html + test -f web/CNAME + test -f web/.nojekyll - uses: actions/configure-pages@v5 - uses: actions/upload-pages-artifact@v3 with: - path: web + path: web/ + include-hidden-files: true - id: deployment uses: actions/deploy-pages@v4 diff --git a/CNAME b/CNAME deleted file mode 100644 index f51a99b..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -tomato.tmarhguy.com \ No newline at end of file From e8284ff5a265916efd21e5a4b0537f58e4b9034b Mon Sep 17 00:00:00 2001 From: Tyrone Marhguy Date: Sat, 15 Aug 2026 15:31:06 -0400 Subject: [PATCH 3/3] chore: drop the GitHub Pages workflow --- .github/workflows/pages.yml | 51 ------------------------------------- .github/workflows/web.yml | 2 -- web/CNAME | 1 - web/README.md | 15 ++++------- web/tests/site-sanity.mjs | 8 +----- 5 files changed, 6 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/pages.yml delete mode 100644 web/CNAME diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index f332b4f..0000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: pages - -on: - push: - branches: [main] - paths: - - "web/**" - - ".github/workflows/pages.yml" - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: pages - cancel-in-progress: true - -jobs: - sanity: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Site sanity - working-directory: web - run: npm test - - deploy: - needs: sanity - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Confirm payload is web/ (not the repo root README) - run: | - test -f web/index.html - test -f web/CNAME - test -f web/.nojekyll - - uses: actions/configure-pages@v5 - - uses: actions/upload-pages-artifact@v3 - with: - path: web/ - include-hidden-files: true - - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 11c8ffc..37757d2 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -7,13 +7,11 @@ on: - "web/**" - "vercel.json" - ".github/workflows/web.yml" - - ".github/workflows/pages.yml" pull_request: paths: - "web/**" - "vercel.json" - ".github/workflows/web.yml" - - ".github/workflows/pages.yml" workflow_dispatch: jobs: diff --git a/web/CNAME b/web/CNAME deleted file mode 100644 index ea3b6d4..0000000 --- a/web/CNAME +++ /dev/null @@ -1 +0,0 @@ -tomato.tmarhguy.com diff --git a/web/README.md b/web/README.md index d4f6caa..966497b 100644 --- a/web/README.md +++ b/web/README.md @@ -104,7 +104,6 @@ web/ ├── js/ # Engine: bench, viewer, alu emulator, forge ├── assets/pcb/alu.glb # KiCad 07_alu export (~31 MB) ├── tests/ # Custom sanity + emulator test suite -├── CNAME # tomato.tmarhguy.com └── ATTRIBUTION.md ``` @@ -132,22 +131,18 @@ cd web && npm test ## Deployment - **Live origin:** [tomato.tmarhguy.com](https://tomato.tmarhguy.com/) -- **GitHub Pages (authority):** `.github/workflows/pages.yml` publishes `web/` on push to `main`. `CNAME` is `tomato.tmarhguy.com`. `.nojekyll` keeps underscored directories from being ignored. -- **Vercel:** Optional mirror. The root `vercel.json` serves `web/` and runs `npm test` as the build. Do **not** point `tomato.tmarhguy.com` at Vercel — that hostname is the Pages custom domain (`alu.tmarhguy.com` is the Vercel site). +- **Vercel:** The root `vercel.json` serves `web/` and runs `npm test` as the build. No framework, no install. +- **CI:** `.github/workflows/web.yml` runs the same sanity suite on PRs and pushes to `main`. There is no GitHub Pages workflow. ### Custom domain DNS (Namecheap) -`tmarhguy.com` is on Namecheap BasicDNS (`pdns1.registrar-servers.com`). GitHub Pages 301s `tmarhguy.github.io/tomato/` to `tomato.tmarhguy.com`. If this CNAME is missing, **both** URLs look dead (`InvalidDNSError` in Pages settings). - -In Namecheap → Domain List → `tmarhguy.com` → Advanced DNS, add: +Same pattern as `alu.tmarhguy.com`. In Namecheap → Domain List → `tmarhguy.com` → Advanced DNS: | Type | Host | Value | TTL | |------|------|-------|-----| -| CNAME | `tomato` | `tmarhguy.github.io.` | Automatic | - -No A record on `tomato`. Do not CNAME it to `cname.vercel-dns.com`. +| CNAME | `tomato` | `cname.vercel-dns.com.` | Automatic | -Then in the repo: **Settings → Pages**. Wait until the DNS check is green, then enable **Enforce HTTPS**. GitHub already has a cert for this hostname. +Add `tomato.tmarhguy.com` as a domain on the Vercel project. Clear any custom domain under the repo **Settings → Pages** so GitHub stops 301ing `github.io/tomato` at a dead hostname. --- diff --git a/web/tests/site-sanity.mjs b/web/tests/site-sanity.mjs index a90a929..e7fe11c 100644 --- a/web/tests/site-sanity.mjs +++ b/web/tests/site-sanity.mjs @@ -1,6 +1,6 @@ /** * Static-site sanity for The Tomato paper. - * Pure Node — no install. Catches what breaks on GitHub Pages / Vercel: + * Pure Node — no install. Catches what breaks on Vercel / local preview: * missing assets, dead relative links, root-absolute paths, broken JS syntax, * missing deploy markers, and a local HTTP smoke of every HTML page. */ @@ -18,7 +18,6 @@ const WEB = resolve(__dirname, ".."); const REQUIRED = [ "index.html", "404.html", - "CNAME", ".nojekyll", "css/magazine.css", "css/viewer.css", @@ -107,11 +106,6 @@ test("required deploy files exist", () => { } }); -test("Pages CNAME is tomato.tmarhguy.com", () => { - const cname = readFileSync(join(WEB, "CNAME"), "utf8").trim(); - assert.equal(cname, "tomato.tmarhguy.com"); -}); - test("HTML documents have basics", () => { for (const file of htmlFiles()) { const html = readFileSync(file, "utf8");