diff --git a/.github/workflows/chromatic.yaml b/.github/workflows/chromatic.yaml new file mode 100644 index 0000000000..2f56413e3b --- /dev/null +++ b/.github/workflows/chromatic.yaml @@ -0,0 +1,33 @@ +name: 'Chromatic' + +on: + push: + branches: [main, sno-storybook] + pull_request: + branches: [main] + +jobs: + chromatic-deployment: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for Chromatic baseline + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build Storybook and run Chromatic + uses: chromaui/action@latest + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + buildScriptName: build-storybook + autoAcceptChanges: 'main' # Auto-accept changes on main branch + exitOnceUploaded: true # Don't wait for UI tests to complete \ No newline at end of file