Skip to content

ci(pages): pin custom domain via CNAME in Pages artifact#1508

Merged
mchmarny merged 1 commit into
mainfrom
ci/pages-cname-artifact
Jun 27, 2026
Merged

ci(pages): pin custom domain via CNAME in Pages artifact#1508
mchmarny merged 1 commit into
mainfrom
ci/pages-cname-artifact

Conversation

@mchmarny

Copy link
Copy Markdown
Member

Summary

Write a CNAME file into the GitHub Pages artifact so the evidence dashboard's custom domain (validation.aicr.run) is reasserted on every publish.

Motivation / Context

The evidence dashboard (evidence-dashboard-publish.yaml, GP5 / #1405) deploys to GitHub Pages using the GitHub Actions source. In that mode the custom domain is stored in repo settings, but a deploy whose artifact omits a CNAME file can silently clear that setting — flapping the domain off the live site and forcing a manual re-add + DNS re-check. Writing the file on each build makes the domain self-healing.

Discovered while bringing validation.aicr.run online: DNS was correct but the artifact carried no CNAME, leaving the custom-domain state dependent solely on the settings value.

Fixes: N/A
Related: #1405

Type of Change

  • Build/CI/tooling

Component(s) Affected

  • Other: .github/workflows/evidence-dashboard-publish.yaml (GitHub Pages deploy)

Implementation Notes

  • The step runs after the determinism diff (diff -r _site _site_check) so the extra CNAME file cannot trip the byte-identical reproducibility gate.
  • Domain is a literal (validation.aicr.run), matching the repo's preference for explicit, self-documenting values in workflows.
  • No change to job permissions, credentials, or the fork-safety gates.

Testing

yamllint .github/workflows/evidence-dashboard-publish.yaml   # clean

Workflow-only change (one added step); no Go sources touched, so the test/coverage and e2e/scan portions of make qualify are not applicable. Full make qualify equivalent runs in CI.

Risk Assessment

  • Low — Single added step, isolated to the Pages publish path, trivially reversible.

Rollout notes: Takes effect on the next publish to main. No migration; if reverted, the domain simply reverts to relying on the settings value.

Checklist

  • Tests pass locally (make test with -race) — N/A (no Go changes)
  • Linter passes (yamllint clean)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality — N/A (CI workflow)
  • I updated docs if user-facing behavior changed — N/A
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)

The evidence dashboard publishes to GitHub Pages via the Actions source,
where the custom domain (validation.aicr.run) is stored in repo settings.
A deploy whose artifact omits a CNAME file can silently clear that setting,
flapping the domain off the live site.

Write _site/CNAME on every build so the domain is reasserted on each publish
and becomes self-healing. The step runs after the determinism diff so the
extra file cannot trip the byte-identical reproducibility gate.

Signed-off-by: Mark Chmarny <mark@chmarny.com>
@mchmarny mchmarny requested a review from a team as a code owner June 27, 2026 13:34
@mchmarny mchmarny added the theme/ci-dx CI pipelines, developer experience, and build tooling label Jun 27, 2026
@mchmarny mchmarny self-assigned this Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 8380e02b-aef8-4b08-92df-ce401d98d67e

📥 Commits

Reviewing files that changed from the base of the PR and between f7545fd and bbfa991.

📒 Files selected for processing (1)
  • .github/workflows/evidence-dashboard-publish.yaml

📝 Walkthrough

Walkthrough

The evidence-dashboard-publish.yaml workflow gains a new step, "Assert custom domain," which writes validation.aicr.run into _site/CNAME. This step is inserted after the byte-identical reproducibility diff check between the two generated site directories, ensuring the CNAME file is present in the final published artifact without interfering with the determinism gate.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • NVIDIA/aicr#1504: Introduced the evidence-dashboard-publish.yaml workflow that this PR extends with the CNAME assertion step.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the workflow change to add a CNAME file for the Pages artifact.
Description check ✅ Passed The description matches the workflow-only change and explains the CNAME artifact update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pages-cname-artifact

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report ✅

Metric Value
Coverage 77.9%
Threshold 75%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-77.9%25-green)

No Go source files changed in this PR.

@mchmarny mchmarny merged commit 9aeac26 into main Jun 27, 2026
33 of 34 checks passed
@mchmarny mchmarny deleted the ci/pages-cname-artifact branch June 27, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci size/XS theme/ci-dx CI pipelines, developer experience, and build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant