← gitpulse
Merged
Size
XL
Change Breakdown
New Feature45%
CI/CD30%
Configuration15%
Documentation10%
#26feat: ship @gitpulse/cli + reusable Pages workflow

Gitpulse CLI shipped to npm with reusable Pages workflow

A new CLI package lets any project publish its gitpulse analytics to GitHub Pages, Vercel, Netlify, or custom infrastructure — no bundler or token management required.

Gitpulse's earlier GitHub Action approach hit a dead end: the ncc bundler conflicted with TypeScript 5.7's import extension handling, making the package fragile for external use. The fix was to abandon the action entirely and ship a plain npm package instead.

The new @gitpulse/cli package runs analyze and build commands entirely through environment variables — no CLI flags, no configuration files. It works the same whether invoked via npx, embedded in a Vercel build hook, or called from any CI system. The build command clones the repository at the matching gitpulse tag, sanitizes any leaked secrets from the caller's environment, and runs the Next.js static export.

A new reusable workflow, publish-pages.yaml, wraps the CLI for GitHub Pages deployments. External repositories can publish their gitpulse analytics with a one-line workflow call: no tokens to rotate, no build steps to maintain.

Publishing is handled through Trusted Publishing (OIDC). The release-please workflow mints short-lived npm credentials per release, eliminating the need for a permanent NPM_TOKEN secret. Both the site and CLI packages use linked versioning so they increment together, keeping tags clean for consumers pinning @v0.

The site/next.config.js gains a GITPULSE_BASE_PATH override so the site works on root domains (Vercel, user Pages, custom domains) without the /<repo>/ prefix that GitHub Pages requires.