Skip to content

Docs: CLI release filled in at build time; GitHub Actions example triggers once per PR commit - #174

Merged
ndbroadbent merged 2 commits into
mainfrom
docs-cli-version
Dec 4, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
docs-cli-version

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

The case studies session found the docs still pinning CLI and Action v0.2.23 after 0.2.24 shipped. Moving the pins by hand kept falling behind.

One place for the version

  • Docs pages now write {{cli_version}}: VISUALCI_VERSION={{cli_version}} and github-action@v{{cli_version}}.
  • frontend/scripts/cli-version.mjs fills it in at build time with the newest published GitHub release. That's the release, not Cargo.toml, so the docs never name a CLI nobody can download yet: the release workflow runs after the site deploys.
  • VISUALCI_CLI_VERSION overrides it.
  • In CI, the build fails if GitHub can't say. Locally it falls back to the workspace version, with a warning.
  • Where it's used:
    • prerender (pages and their .md copies);
    • the app's add-to-CI step (__VISUALCI_CLI_VERSION__, defined in vite.config);
    • the app image, as a build arg, so a new release rebuilds the cached frontend layer.
  • The CI build steps get GITHUB_TOKEN.
  • skills/ are committed and served over MCP and the plugins, so they can't hold a build-time value. They say x.y.z, with a line pointing at https://github.com/DocSpring/visualci/releases/latest. Plugin bumped to 0.1.56.
  • site.mjs now fails if any page or .md copy still says {{cli_version}}, or if pages pin different releases. The release lookup it used to make is gone, because the version comes from the release.
  • AGENTS.md: the rule about moving pins by hand now describes {{cli_version}}.
  • Known lag: after a release, the docs move to it on the next site deploy, which is the next merge to main.

One build per PR commit

  • The GitHub Actions quick-start example now has on: pull_request plus push: branches: [main].
  • A sentence under it says push on every branch too sends two builds for each PR commit.
  • The add-to-CI step copies this example, so it changes there too.

Checked on a build box:

  • pnpm build with CI=1 and no token resolved 0.2.24; dist pins 0.2.24 everywhere.
  • vitest: 54 pass. tsc -b: clean. skills.mjs --check: clean. actionlint: clean.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@visualci-com

visualci-com Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #536 · 414 unchanged · no changes

This PR vs base: 24 changed, 22 added since #432, across 3 builds

docspring/visualci · journeys · build #534 · 2 changed, 40 unchanged · approved by visualci features agent for Nathan Broadbent

Intended: the add-to-CI snippet gains the on: pull_request + push to main triggers and pins the latest release (v0.2.25) from the build-time lookup. The dashboard change is #191's, approved in build 517.

This PR vs base: 4 changed, 12 added since #405, across 4 builds

Snapshot Before After
journeys/setup-picks-from-300-repositories/09-add-to-ci-myself (changed)
journeys/sign-in-from-the-site/02-dashboard (changed)

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent merged commit c71cf65 into main Dec 4, 2026
16 checks passed
@ndbroadbent
ndbroadbent deleted the docs-cli-version branch December 4, 2026 08:14
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