Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk5 min

How to Set Up Chromatic with Storybook and GitHub Actions

Connect a Storybook project to Chromatic in GitHub Actions with a secure project token, a workflow example, and guidance for reviewing visual changes.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To run Chromatic visual tests in GitHub Actions, connect your Storybook project to Chromatic, save its project token as a GitHub Actions secret, and add a workflow that checks out your code, installs dependencies, and runs chromaui/action. The workflow can publish story snapshots for review on pull requests. You can use Storybook’s official @chromatic-com/storybook addon for local visual-test interaction, but the addon is not required to run Chromatic from CI.

Before you configure the integration

  • Check your Storybook version and package manager. The Storybook visual-testing guide documents @chromatic-com/storybook for Storybook 7.6 or higher; the Chromatic integration listing separately gives 6.5+ for its CLI and GitHub Action. These are different integration paths, not interchangeable minimums. Use documentation matching your installed version. Storybook visual testing guide and Chromatic integration listing.
  • Make sure your repository has a working Storybook and a lockfile-supported dependency installation command. The example below uses npm ci; substitute the equivalent command for your package manager.
  • Decide whether you want the Storybook addon for local review, CI publishing only, or both. Chromatic’s GitHub Action can be configured directly either way.

Add the Storybook addon (optional)

For the addon workflow, run the documented command from the project root:

As an Amazon Associate I earn from qualifying purchases.

npx storybook@latest add @chromatic-com/storybook

Follow the setup prompts to select or create a Chromatic project. First-time setup can create configuration and project identifiers. The optional chromatic.config.json settings documented for this integration include projectId, buildScriptName, debug, and zip; the guide recommends zip for large projects. Check the guide for the Storybook version installed in your repository before applying those settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The addon provides local visual-test interaction. You can skip it if your immediate goal is simply to publish visual tests from GitHub Actions.

Save the Chromatic project token as a GitHub secret

  1. In GitHub, open the repository and go to Settings → Secrets and variables → Actions.
  2. Select New repository secret.
  3. Name it CHROMATIC_PROJECT_TOKEN and paste the project token from your Chromatic project.
  4. Save the secret. The workflow will access it as ${{ secrets.CHROMATIC_PROJECT_TOKEN }}.

Treat the project token as a credential: do not commit it in workflow YAML, source code, or configuration files. Chromatic’s publishing example also uses GITHUB_TOKEN for git-provider integration; follow the permissions and inputs required by the action version you use. See Chromatic’s GitHub Actions guide.

Create the GitHub Actions workflow

Add .github/workflows/chromatic.yml to the repository. This example follows the structure in Chromatic’s current guide: it checks out full Git history, sets up Node, installs dependencies, and invokes the action.

name: Chromatic

on: push

jobs:
  chromatic:
    name: Run Chromatic
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v7
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v7
        with:
          node-version: 24.20.0
      - name: Install dependencies
        run: npm ci
      - name: Run Chromatic
        uses: chromaui/action@latest
        with:
          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

The action tag, Node version, and installation command above reflect the example in the guide accessed on October 3, 2026; they are not a guarantee that those versions will remain current. Confirm supported versions in the official guide and match the install command to your lockfile. For example, do not use npm ci in a project whose dependencies are managed with another package manager.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run on pull requests

The example uses on: push, so it runs on pushes. If you want visual checks to run for pull requests, configure the workflow triggers to match your repository’s branch and merge process. Chromatic’s documentation describes a UI Tests check on pull/merge requests once the integration is configured. You can make that check required in your git provider if that fits your merge policy.

Use a Storybook build produced by an earlier step

If another workflow step has already built Storybook, point the Chromatic action at the generated directory using its storybookBuildDir input. Set the value to the actual build output path for your project; do not assume a directory name that differs from your build configuration. If you are not supplying a prior build, follow the action’s documented workflow instead.

Review visual changes and baselines

When the workflow publishes stories, review changed pixels in Chromatic’s Visual Tests panel. Fix unintended changes in the code; accept a changed baseline only when the visual difference is intentional. Storybook’s guide says baselines accepted through its addon are automatically accepted in CI, so the same baseline change does not need a second acceptance in the CI review. Storybook’s visual-testing guide.

Choose Chromatic, the test runner, or both

Chromatic and Storybook’s test runner overlap in testing stories but address different needs. Chromatic is a hosted service for visual and component checks, with git-provider integration and visual-diff review. Storybook’s test runner is configurable for custom tests and can run locally or in CI. A team can use Chromatic for visual review and the test runner for custom checks. Exact capabilities can vary by version. See Storybook’s test-runner documentation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot common setup problems

  • The addon command or configuration does not match your project: verify the installed Storybook version and use its corresponding documentation. The 7.6+ addon threshold and the separately stated 6.5+ CLI/action compatibility refer to different paths.
  • The action cannot authenticate: confirm the repository secret is spelled CHROMATIC_PROJECT_TOKEN, that its value is the intended project token, and that the workflow references ${{ secrets.CHROMATIC_PROJECT_TOKEN }}. Do not replace the secret reference with a literal token.
  • Dependency installation fails: ensure the workflow uses the package manager and install command supported by the repository’s lockfile. The sample’s npm ci assumes an npm lockfile.
  • The action cannot find a prebuilt Storybook: check that the build step ran successfully and that storybookBuildDir points to its output directory. If no earlier build is supplied, use Chromatic’s documented action flow.
  • Git-provider context or pull-request checks are missing: check the action inputs and permissions required for the action version in use, including any documented GITHUB_TOKEN configuration. Also confirm that workflow triggers include the events you expect.
  • Action or runtime versions stop working: compare the workflow’s action tags and Node version with Chromatic’s current GitHub Actions guide and update the example values as needed.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

Chromatic is for Storybook visual testing. If your separate task is capturing a website screenshot or PDF through an API, ScreenshotNeo can return one with a single GET request. For example, this cURL request saves a WebP screenshot of Stripe:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. It also offers an MCP server for AI agents, with tools including take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.