CI: a clip for every release
The GitHub Action#
npx demovie ci init # writes .github/workflows/demovie.yml (asks first; --yes to skip)The generated workflow runs on release: published and workflow_dispatch (and, if you uncomment it,
deployment_status for Vercel previews). It uses the composite action in packages/action:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # tags and history for `demovie changes`
- uses: enszrlu/demovie/packages/action@v0
with:
agent: claude # or codex
type: changelog
app-url: ${{ github.event.deployment_status.environment_url }} # or `start: pnpm build && pnpm start`
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # an API key, not a subscription
DEMOVIE_USER: ${{ secrets.DEMOVIE_USER }}
DEMOVIE_PASSWORD: ${{ secrets.DEMOVIE_PASSWORD }}Inputs: agent, agent-version (pin it), type, formats, since (default: the previous tag), app-url or
start, working-directory, comment (default true), upload-release-asset (default true on releases),
node-version (default 22).
What it does:
- Sets up Node, finds the lockfile nearest to
working-directory(up to the repository root, so a monorepo app installs at the workspace root), sets up pnpm (with its store cached) or Bun when that's what the lockfile says, and installs your dependencies (pnpm install --frozen-lockfile,npm ci,yarn install,bun install). pnpm's version comes frompackageManagerinpackage.json, else from the lockfile's format. - Installs the agent CLI at the pinned version.
- Installs the Chromium build that your demovie's Playwright version expects (read from
demovie --json doctor; with its system libraries on Linux), and ffmpeg if missing. demovie doctor, thendemovie capture --changed --since <ref>.demovie changes --since <ref>for the story, thendemovie make --agent … --type changelog --yes.- Uploads
out/as a workflow artifact. Thevideosandout-diroutputs are relative to the repository root. - Comments on the pull request (or writes the job summary) with the poster, links and the QA summary.
- On releases, attaches the MP4s and posters to the release (
gh release upload).
Vercel previews#
Set app-url from github.event.deployment_status.environment_url and add the
VERCEL_AUTOMATION_BYPASS_SECRET secret: the action sends it as x-vercel-protection-bypass with
x-vercel-set-bypass-cookie: true on every request to the preview.
Overrides for any CI#
The CLI reads these environment variables, so other CI systems can do the same as the action:
| Variable | Effect |
|---|---|
DEMOVIE_APP_URL | Use an already running app at this URL (no start command). |
DEMOVIE_APP_START | Replace app.start.command. |
DEMOVIE_APP_HEADERS | JSON object of extra request headers (treated as secrets). |
CI | Implies --yes (no prompts). |
demovie changes#
npx demovie changes --since v1.2.0 --jsonLists commits (conventional-commit type, scope, subject, PR numbers; PR titles via gh when available), changed
files, and the routes they affect — directly (a page or layout changed) or through the import graph (a shared
component used by a page, tsconfig paths resolved, up to 6 imports deep) — plus the captures and flows to refresh
and a one-line story of the user-visible changes.