Run chromatic on PR & on main branch (#3654)
This commit is contained in:
parent
dc2cd4cef1
commit
531dd236f2
1 changed files with 16 additions and 1 deletions
17
.github/workflows/storybook-chromatic.yml
vendored
17
.github/workflows/storybook-chromatic.yml
vendored
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue