generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 41
42 lines (38 loc) · 1.17 KB
/
frontend_chromatic_main.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
name: Chromatic Main Branch
on:
push:
branches: [main]
paths:
- "frontend-react/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
chromatic:
defaults:
run:
shell: bash
working-directory: frontend-react
runs-on: ubuntu-latest
steps:
- name: Checkout - On Push Event
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
fetch-depth: 0
- name: Use Node.js with yarn
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version-file: "frontend-react/.nvmrc"
cache: yarn
cache-dependency-path: frontend-react/yarn.lock
- name: Yarn install
run: yarn install --immutable
- name: Run Chromatic
uses: chromaui/action@f4e60a7072abcac4203f4ca50613f28e199a52ba
with:
workingDir: frontend-react
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# Accept all changes in main
autoAcceptChanges: true
exitOnceUploaded: true