fix(docs): restore docs.ethlambda.xyz custom domain on deploy#399
Conversation
The mdBook deploy step republished book/html on every run without a CNAME file, so a deploy wiped the custom domain set via the Pages UI. GitHub Pages reset its cname to null and docs.ethlambda.xyz started returning 404 while the default *.github.io path kept serving fine. Set the peaceiris cname input so the CNAME file is rewritten on every deploy, making the custom domain binding durable.
🤖 Kimi Code ReviewFile: Verdict: LGTM. This is a necessary fix for GitHub Pages custom domain persistence. Details:
Note: Ensure that Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Codex Code ReviewNo findings.
Residual risk is only operational: the hardcoded domain at Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
🤖 Claude Code ReviewPR #399 —
|
Greptile SummaryThis PR fixes the
Confidence Score: 5/5Safe to merge — the change is a single additive parameter that restores expected behaviour with no side effects on the build or other workflow jobs. The change is confined to one parameter on the deploy step. It writes a well-known CNAME file into gh-pages, which is exactly how GitHub Pages custom domains are meant to be managed in CI. There are no control-flow changes, no secrets involved, and the value matches the documented intended domain. No files require special attention.
|
| Filename | Overview |
|---|---|
| .github/workflows/pr-main_mdbook.yml | Adds cname: docs.ethlambda.xyz to the peaceiris/actions-gh-pages deploy step so the CNAME file is rewritten on every deploy, preventing the custom domain from being silently wiped. |
Sequence Diagram
sequenceDiagram
participant GH as GitHub Actions
participant Pages as gh-pages branch
participant GHPUI as GitHub Pages (UI/API)
participant DNS as DNS (docs.ethlambda.xyz)
Note over GH,DNS: Before this fix
GH->>Pages: push book/html (no CNAME file)
Pages-->>GHPUI: "CNAME wiped → cname=null"
DNS->>GHPUI: request docs.ethlambda.xyz
GHPUI-->>DNS: 404 (domain not associated)
Note over GH,DNS: After this fix
GH->>Pages: push book/html + CNAME (docs.ethlambda.xyz)
Pages-->>GHPUI: "CNAME present → cname=docs.ethlambda.xyz"
DNS->>GHPUI: request docs.ethlambda.xyz
GHPUI-->>DNS: 200 OK
Reviews (1): Last reviewed commit: "fix(docs): restore docs.ethlambda.xyz cu..." | Re-trigger Greptile
Problem
https://docs.ethlambda.xyz/ returns 404, even though the docs build and deploy succeed and
https://lambdaclass.github.io/ethlambda/serves 200.Root cause
lambdaclass.github.io/ethlambda/docs.ethlambda.xyzcnamefieldnullCNAMEfile ingh-pagesThe deploy step used
peaceiris/actions-gh-pages@v4without acname:parameter, so every deploy republishedbook/htmlwithout aCNAMEfile. The custom domain (originally set via the Pages UI, which writes aCNAMEfile) got wiped by a later deploy, resetting Pagescnametonull. DNS still points the browser at GitHub's edge, but Pages no longer associatesdocs.ethlambda.xyzwith this repo, so it 404s.Fix
Add
cname: docs.ethlambda.xyzto the deploy step so theCNAMEfile is re-written on every deploy, making the custom domain binding durable.Note (manual step to restore now)
This makes future deploys self-healing. To restore the live site immediately, the domain must also be re-set once: merge this (the deploy on
mainwill write the CNAME and re-bind the domain), or re-enter the domain under Settings → Pages → Custom domain.