-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (32 loc) · 1.12 KB
/
chromatic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: 'Chromatic'
on: push
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: npm i --legacy-peer-deps && npm run build-storybook
- name: Publish to non-master non-beta to Chromatic
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/beta'
uses: chromaui/action@v11
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
env:
STORYBOOK_BUILD_TIMEOUT: 1200000
NODE_ENV: test
CI: true
- name: Publish Chromatic and auto accept changes for master and beta
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta'
uses: chromaui/action@v11
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: true # 👈 Option to accept all changes
env:
STORYBOOK_BUILD_TIMEOUT: 1200000
NODE_ENV: test
CI: true