-
Notifications
You must be signed in to change notification settings - Fork 32
40 lines (39 loc) · 1.22 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
name: CI
on:
push:
branches-ignore:
- legacy
tags-ignore:
- "*"
jobs:
build:
name: Run chromatic tests
runs-on: ubuntu-latest
# disable for dependabot PRs as they don't have access to secrets
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Setup PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: |
- recursive: false
args: [--frozen-lockfile]
- name: Publish to Chromatic
if: github.ref != 'refs/heads/main'
uses: chromaui/action@a89b674adf766dbde41ad9ea2b2b60b91188a0f0 # v6.17.4
with:
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