-
Notifications
You must be signed in to change notification settings - Fork 1.5k
52 lines (41 loc) · 1.39 KB
/
chromatic.yml
File metadata and controls
52 lines (41 loc) · 1.39 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Chromatic
on:
push:
branches:
- main
pull_request:
pull_request_target:
types: [labeled]
# cancel in-progress runs on new commits to same PR (gitub.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
chromatic:
# Run on push, regular PR (for repo branches), or labeled PR with safe-to-deploy (for forks)
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request' ||
(github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy')
timeout-minutes: 20
runs-on: ubuntu-latest
environment:
name: development
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # we need to fetch at least parent commit to satisfy Chromatic
ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
# Storybook with submodules
- uses: ./.github/actions/submodules-checkout
with:
submodules-ssh-key: ${{ secrets.PRIVATE_GITHUB_DEPLOY_TOKEN }}
- uses: ./.github/actions/ci-setup
- name: Chromatic
id: chromatic
uses: chromaui/action@v11.3.0
with:
projectToken: bea8dc1981d4
buildScriptName: storybook:build