Skip to content

ci: drop PAGES_BASE, the private Pages site is served at root - #2

Merged
HaydenBruin merged 3 commits into
mainfrom
fix/pages-base-path
Aug 24, 2026
Merged

ci: drop PAGES_BASE, the private Pages site is served at root#2
HaydenBruin merged 3 commits into
mainfrom
fix/pages-base-path

Conversation

@HaydenBruin

Copy link
Copy Markdown
Contributor

Access control is on for the Pages site, so it is served from its own generated
subdomain at the roothttps://<generated>.pages.github.io/ — rather than
as a project site under /<repo>. PAGES_BASE: /ui was wrong for that.

It was harmless only by luck: the static adapter emits relative asset URLs
(./_app/...) and the gallery is a single page whose only links are same-page
anchors, so nothing resolved off-site. Verified — the built index.html has
zero absolute /ui/ references either way. It would break every internal link
the moment the gallery gains a second route.

The workflow now notes that turning access control off flips this back: the URL
becomes engineio.github.io/ui and the base is needed again.

Verified

  • pages run 32717119994 succeeded after Pages was enabled, and deployed
  • DS_VERSION resolves to v0.2.0 from git describe, and the gallery header renders it
  • The site returns 302 -> github.com/pages/auth, confirming access control is active
  • Rebuilt with no base: assets still relative, zero /ui/ references

Opened as a PR rather than pushed to main — the previous two pushes bypassed
the pull-request ruleset and that should not become the habit.

HaydenBruin and others added 3 commits August 24, 2026 20:33
Access control is enabled on the Pages site, so it is served from its own
generated subdomain at the root — https://<generated>.pages.github.io/ — not as
a project site under /<repo>. `PAGES_BASE: /ui` was therefore wrong.

It was harmless only by luck: the static adapter emits relative asset URLs, and
the gallery is a single page whose only links are same-page anchors, so nothing
resolved off-site. It would break every internal link the moment the gallery
gains a second route.

Noted in the workflow that turning access control off flips this back — the URL
becomes engineio.github.io/ui and the base is needed again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The repo .npmrc carried `//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}`.
npm expands that variable, it only exists in CI, and the empty result OVERRIDES
whatever real token a developer has in ~/.npmrc — so any local `npm view` or
`npm install` inside this repo fails with `E401 unauthenticated` while the
developer holds a perfectly good credential. The error reads like a bad token
rather than a missing environment variable, which is the worst kind of wrong.

The line was redundant anyway: actions/setup-node writes its own authenticated
user config from NODE_AUTH_TOKEN, and project config only outranks user config
for keys it actually declares. Verified by simulating the CI arrangement — with
setup-node's user config present the token is sent and authenticates, so the
publish path is unaffected.

The file now maps the @engineio scope and nothing else.

MIGRATION.md §1 gets the same warning plus two things this cost time to learn:
the PAT must be CLASSIC, because GitHub Packages' npm registry rejects
fine-grained tokens with a failure indistinguishable from a wrong token; and a
one-command access check with both error codes decoded, since engine and rgs
will hit exactly this wall.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Stale since the status palette landed. The line described the interim state
where destructive aliased magenta because no error colour existed.
@HaydenBruin
HaydenBruin merged commit 4e4abdb into main Aug 24, 2026
1 check passed
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.

1 participant