Skip to content

fix: handle empty radio group (#2825) #313

fix: handle empty radio group (#2825)

fix: handle empty radio group (#2825) #313

# .github/workflows/chromatic.yml
# Workflow name
name: 'Chromatic (Next)'
permissions:
contents: read
# Event for the workflow
on:
push:
branches:
- main
jobs:
chromatic-deployment-next:
runs-on: ubuntu-latest
if: ${{ vars.CHROMATIC_BASELINE_BRANCH == 'next' && !contains(github.event.head_commit.message, '[skip chromatic]') }}
steps:
# 👇 Version 2 of the action
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=true pnpm i
# 👇 Build storybook with pnpm
- name: Build storybook
run: cd packages/docs && pnpm run build.chromatic
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@latest
# Options required to the GitHub Chromatic Action
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# Speedup the build by not waiting until everything is sent to Chromatic
exitOnceUploaded: true
# We don't need tests in the main branch, but want to accept everything
autoAcceptChanges: true
# We need to manually build storybook with pnpm
storybookBuildDir: packages/docs/dist/storybook