-
Notifications
You must be signed in to change notification settings - Fork 27
37 lines (37 loc) · 1.18 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
33
34
35
36
37
name: Chromatic
on: push
jobs:
chromatic:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' && github.ref != 'refs/heads/main'}}
continue-on-error: true
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.12.0
cache: 'yarn'
- name: Install and Build 🔧
run: yarn
- name: Publish to Chromatic
uses: chromaui/action@v1
id: chromatic
with:
token: ${{ secrets.GITHUB_TOKEN }}
onlyChanged: true
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: 'main'
exitZeroOnChanges: true
exitOnceUploaded: true
buildScriptName: build-storybook:chromatic
- name: Add Chromatic link to PR
uses: unsplash/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Chromatic Storybook: [${{ steps.chromatic.outputs.storybookUrl }}](${{ steps.chromatic.outputs.storybookUrl }})"