Skip to content

ci(docs): capture documentation screenshots in a workflow #5263

Closed

Description

@tale-review-bot

Part of #5246 and #5200, split off by the Lead's decision on both: the capture they need.

Goal

A documentation screenshot can be retaken without a person's machine. A GitHub Actions workflow:

  1. boots the disposable stack of services/platform/tests/docs-screenshots/README.md;
  2. runs bun run docs:screenshots for the shots it is asked for;
  3. returns the WebP files as an artifact, which an agent commits on its branch.

Two retakes wait for it:

What it has to do

  • Start on demand, for a branch. Its inputs are the shots (--only) and the locales (--locales, default en).
    • Only someone who can already push to the repository may start it: workflow_dispatch.
    • Optionally also a push to a dedicated branch prefix, so the workflow can be proven before it reaches main. GitHub only starts a workflow_dispatch workflow that is on the default branch.
    • Never pull_request_target, issue_comment, workflow_run, or any trigger a fork can start.
  • Least access.
    • permissions: contents: read, and nothing more.
    • No repository secret beyond the read-only GITHUB_TOKEN that the existing setup steps take.
    • persist-credentials: false.
  • Safe inputs. The inputs reach the shell only through env:. Before use, they are checked against bun run docs:screenshots -- --list and the shipped locales. Never put ${{ inputs.* }} inside a run: script.
  • The runbook's stack, nothing else.
    • The synthetic seed and the mock gateway.
    • The repository's database image and an object store, started on the runner.
    • The same runner selection as the E2E platform job.
    • No model provider, no customer data, no external credential.
  • The artifact.
    • It holds only the captured files under services/docs/public/images/ and the generated manifest.
    • It is kept for 7 days at most.
    • It never holds .state/ (which holds a session), or logs that carry a session.
  • Marketing posters (optional). Some posters derive from a docs shot: docs: retake the governance screenshots that still say Competences #5200's governance-audit-logs feeds services/web/public/marketing/optimized/governance-audit-logs-*. If regenerating them needs the stack, the workflow may offer web:screenshots as a second mode, under the same constraints.
  • The runbook gets a section "Capture in CI" that says how to:
    • start the workflow for a branch;
    • download the artifact (gh run download);
    • inspect each image at full size before committing it.

Done when

  • The workflow and the runbook section are on the task's branch.
  • The repository's workflow checks pass.
  • A run of the workflow on the task's head captured at least one shot and uploaded it. agent-consent is the natural shot to use.
    • The handover gives the run's ID.
    • The image was inspected at full size.
    • What could not be run is written down.

Line: stable. It is a ci change about the docs and the screenshot runner that main ships, and workflow_dispatch only starts from the default branch.
Kind: improvement. Priority: p3.

Activity

  1. added
    improvement
    agent-ready
    on Nov 1, 2026
  2. added a commit that references this issue on Nov 2, 2026
    c722a59
  3. added a commit that references this issue on Nov 2, 2026
    66e2687
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyimprovement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions