Skip to content

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

Open
ndbroadbent wants to merge 2 commits into
mainfrom
docs-cli-version
Open

ndbroadbent wants to merge 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.

Get evidence
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 #495 · 400 unchanged · no changes

This PR vs base: 12 changed, 8 added since #432, across 2 builds

docspring/visualci · journeys · build #491 · 1 changed, 34 unchanged · waiting for review

This PR vs base: 1 changed, 5 added since #405, across 3 builds · 1 not approved yet

Snapshot Before After
journeys/sign-in-from-the-site/02-dashboard (changed)

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

This branch has not been deployed

No deployments
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