Run chromatic on PR & on main branch (#3654)

This commit is contained in:
Krzysztof Żuraw 2023-05-18 16:40:48 +02:00 committed by GitHub
parent dc2cd4cef1
commit 531dd236f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,13 @@
name: QA name: QA
on: [pull_request] on:
push:
branches-ignore:
# Matches release branches
- "[0-9]+.[0-9]+"
tags-ignore:
# Matches release tags
- "*"
jobs: jobs:
chromatic-storybook: chromatic-storybook:
@ -30,6 +37,14 @@ jobs:
run: npm ci run: npm ci
- name: Publish to Chromatic - name: Publish to Chromatic
if: github.ref != 'refs/heads/main'
uses: chromaui/action@a89b674adf766dbde41ad9ea2b2b60b91188a0f0 # v6.17.4 uses: chromaui/action@a89b674adf766dbde41ad9ea2b2b60b91188a0f0 # v6.17.4
with: with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Publish to Chromatic and auto accept changes
if: github.ref == 'refs/heads/main'
uses: chromaui/action@a89b674adf766dbde41ad9ea2b2b60b91188a0f0 # v6.17.4
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: true