Skip to content

fix(docs): restore docs.ethlambda.xyz custom domain on deploy#399

Merged
ilitteri merged 2 commits into
mainfrom
fix/docs-custom-domain
May 28, 2026
Merged

fix(docs): restore docs.ethlambda.xyz custom domain on deploy#399
ilitteri merged 2 commits into
mainfrom
fix/docs-custom-domain

Conversation

@MegaRedHand
Copy link
Copy Markdown
Collaborator

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

Check Result
lambdaclass.github.io/ethlambda/ 200 (content live)
docs.ethlambda.xyz 404
DNS → GitHub Pages IPs correct
Pages API cname field null
CNAME file in gh-pages absent

The deploy step used peaceiris/actions-gh-pages@v4 without a cname: parameter, so every deploy republished book/html without a CNAME file. The custom domain (originally set via the Pages UI, which writes a CNAME file) got wiped by a later deploy, resetting Pages cname to null. DNS still points the browser at GitHub's edge, but Pages no longer associates docs.ethlambda.xyz with this repo, so it 404s.

Fix

Add cname: docs.ethlambda.xyz to the deploy step so the CNAME file 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 main will write the CNAME and re-bind the domain), or re-enter the domain under Settings → Pages → Custom domain.

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.
@github-actions
Copy link
Copy Markdown

🤖 Kimi Code Review

File: .github/workflows/pr-main_mdbook.yml

Verdict: LGTM. This is a necessary fix for GitHub Pages custom domain persistence.

Details:

  • Lines 113-117: Correctly adds the cname parameter to peaceiris/actions-gh-pages@v3. This action writes a CNAME file to the deployment root, preventing the custom domain binding from being reset to null on each deploy.
  • Comment clarity: The inline comment accurately describes the failure mode (peaceiris republishes without CNAME, wiping the Pages configuration).
  • Indentation: Correctly aligned with sibling keys (publish_dir, destination_dir).

Note: Ensure that docs.ethlambda.xyz is the intended production domain and that the DNS CNAME record points to <org>.github.io. No security concerns—the domain is public information and the action is trusted.


Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt

@github-actions
Copy link
Copy Markdown

🤖 Codex Code Review

No findings.

.github/workflows/pr-main_mdbook.yml:113-117 is a narrow operational fix that reintroduces the Pages CNAME on each deploy. It does not affect consensus logic, attestation handling, fork choice, state transition, SSZ, or signature code, and I don’t see a correctness, security, or performance regression in the workflow change itself.

Residual risk is only operational: the hardcoded domain at .github/workflows/pr-main_mdbook.yml:117 must stay aligned with the actual Pages custom domain. I did not execute the GitHub Actions workflow locally, so this is a static review of the YAML diff only.


Automated review by OpenAI Codex · gpt-5.4 · custom prompt

@github-actions
Copy link
Copy Markdown

🤖 Claude Code Review

PR #399fix(docs): restore docs.ethlambda.xyz custom domain on deploy

Overview

Single-line YAML change adding cname: docs.ethlambda.xyz to the peaceiris/actions-gh-pages@v4 deploy step in .github/workflows/pr-main_mdbook.yml. This ensures the CNAME file is written to the gh-pages branch on every deploy, preventing the custom domain binding from being silently wiped.


Analysis

Correctness: Accurate root cause and correct fix.

The peaceiris/actions-gh-pages action publishes only the contents of publish_dir. Without cname:, no CNAME file is written, which clobbers any UI-configured custom domain on each deploy. Adding cname: docs.ethlambda.xyz causes the action to inject the file on every push — making the binding self-healing.

Comment quality: Appropriate.

The 4-line comment explaining the peaceiris behavior is justified — this is a non-obvious operational gotcha (a deploy step silently nuking UI-set configuration). The CLAUDE.md convention "only add a comment when the WHY is non-obvious" applies here. For CI YAML, a block comment is reasonable; the Rust-specific "no multi-line comment blocks" rule doesn't apply.

Idempotency: Good.

Writing CNAME on every deploy is idempotent and correct — it converges to the right state regardless of prior UI edits or partial failures.

Scope: Appropriately minimal.

No unrelated changes, no scope creep.


Minor Observations

  • The PR description correctly calls out the required manual step (re-enter the domain in Settings → Pages, or let the first post-merge deploy do it via the new CNAME write). This is worth verifying after merge.
  • No secrets or sensitive values are hardcoded — the domain name is intentionally public.

Verdict

Approve. The fix is correct, minimal, and well-explained. No issues to raise.


Automated review by Claude (Anthropic) · sonnet · custom prompt

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 28, 2026

Greptile Summary

This PR fixes the docs.ethlambda.xyz 404 by adding cname: docs.ethlambda.xyz to the peaceiris/actions-gh-pages deploy step in the mdBook publish workflow, ensuring the CNAME file is written into gh-pages on every deploy instead of being silently wiped.

  • The root cause was that prior deploys published book/html without a CNAME file, overwriting the one originally set via the GitHub Pages UI and resetting the Pages cname field to null. The one-line addition makes the custom domain binding self-healing.
  • No logic changes are introduced; the fix is purely additive to the deploy step configuration.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "fix(docs): restore docs.ethlambda.xyz cu..." | Re-trigger Greptile

@ilitteri ilitteri merged commit abfdd7b into main May 28, 2026
6 checks passed
@ilitteri ilitteri deleted the fix/docs-custom-domain branch May 28, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants