ci: drop PAGES_BASE, the private Pages site is served at root - #2
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Access control is on for the Pages site, so it is served from its own generated
subdomain at the root —
https://<generated>.pages.github.io/— rather thanas a project site under
/<repo>.PAGES_BASE: /uiwas 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-pageanchors, so nothing resolved off-site. Verified — the built
index.htmlhaszero absolute
/ui/references either way. It would break every internal linkthe 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/uiand the base is needed again.Verified
pagesrun 32717119994 succeeded after Pages was enabled, and deployedDS_VERSIONresolves tov0.2.0fromgit describe, and the gallery header renders it302 -> github.com/pages/auth, confirming access control is active/ui/referencesOpened as a PR rather than pushed to
main— the previous two pushes bypassedthe pull-request ruleset and that should not become the habit.