Repository navigation
build(site): build landing data and docs from the latest uptide release - #5
Merged
Merged
Conversation
The site now reflects the release users get from npm, not main. - docs-site/scripts/release.mjs resolves the `latest` dist-tag of `uptide` on npm and checks out tag v<version> of uptide-dev/uptide (anonymous HTTPS, shallow, exactly that ref). A missing tag fails the build, naming the version and the tag; it never falls back to main. The tag's packages/cli/package.json must match the npm version. - The build log prints the resolved version, tag and commit, and every page (landing, 404, docs) carries uptide-version, uptide-ref and uptide-commit meta tags. Repository links point at the tag; Edit page still opens main. - Pages: push, daily schedule and workflow_dispatch as before, split into build and deploy jobs. A manual run may set `ref` to preview another ref: it builds and uploads the artifact, and deploy runs only when the build reports it was built from the release tag and no ref was given. The ref is validated as a ref name and reaches the build only through the environment. - Tests: version resolution against a mocked npm, the tag lookup, the missing-tag failure, and the deploy guard (each mutation of it fails). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VcwhsQvN6vtpRCe4uwfe8z Signed-off-by: Claude <noreply@anthropic.com>
lucasbraum
marked this pull request as ready for review
October 10, 2026 03:40
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.
The landing page's data and the docs are now built from the latest published release of uptide, not from
main.Build log (this branch, run locally)
The step outputs it writes for the workflow:
How the release is resolved
docs-site/scripts/release.mjs:latestdist-tag ofuptide(/-/package/uptide/dist-tags). Today that is 0.6.1, published 2026-10-10.v<version>with an anonymousgit ls-remote. A missing tag fails the build, and nothing falls back tomain:latest: 9.9.9.) npm being unreachable, a non-200 answer, or no usablelatestalso fails the build, with the URL in the message.refs/tags/v<version>.packages/cli/package.jsonmust say the same version as npm.Where the version shows
blob/v0.6.1/…. "Edit page" still opensmain, since a tag can't be edited.Workflow
main, daily at 05:23 UTC (a new release reaches the site within a day), andworkflow_dispatch.refinput:workflow_dispatchtakes an optionalref(default empty) for previews: a branch, tag or commit of uptide-dev/uptide.pages.ymlis now split intobuildanddeploy:buildhascontents: readonly. It builds, checks links, and uploads thegithub-pagesartifact.deployhaspages: write/id-token: write, and its only step isactions/deploy-pages. It runs only ifneeds.build.outputs.release == 'true' && (github.event_name != 'workflow_dispatch' || inputs.ref == '').release=trueonly when it built from the npm release tag.UPTIDE_REFor a local checkout givesrelease=false.refis refused by the condition, whatever the build says.env: UPTIDE_REF: ${{ inputs.ref }}, never pasted into a script. It is validated as a ref name, somain\nrelease=trueis rejected.release=is also written last to$GITHUB_OUTPUT.Checks
v0.6.1tag.UPTIDE_REF=main. It builds, the meta tag saysuptide-ref="main", and the output isrelease=false./,/404.html,/docs/and/docs/commands/fix/, in light and dark, with mobile and desktop presets.node --test 'test/*.test.mjs'passes 28 tests. The newtest/release.test.mjscovers:latest, a non-versionlatest, and offline;v0.6.10does not pass forv0.6.1;main;pages.yml. I checked the assertions by weakening the guard three ways (dropping the release check, droppingneeds: build, hardcodingUPTIDE_REF); each mutation fails the tests.Notes
refshows "Preview built from …: uploaded as an artifact, not deployed." in the job summary. The site is in the run'sgithub-pagesartifact.sitejob inci.ymlis unchanged and now builds PRs against the release too.🤖 Generated with Claude Code
https://claude.ai/code/session_01VcwhsQvN6vtpRCe4uwfe8z
Generated by Claude Code