-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.44 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Chromatic
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
chromatic-deployment:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Chromatic deployment
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
env:
NODE_OPTIONS: "--max_old_space_size=4096"
VITE_MAPBOX_TOKEN: ${{ secrets.VITE_MAPBOX_TOKEN }}
- name: Publish Storybook Preview in Chromatic check summary
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "Storybook Preview: ${{ steps.chromatic.outputs.storybookUrl }}" >> $GITHUB_STEP_SUMMARY
- name: Publish Storybook Preview in PR comment
if: ${{ github.event_name == 'pull_request' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Storybook Preview: ${{ steps.chromatic.outputs.storybookUrl }}
comment_tag: storybookUrl