-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.02 KB
/
cicd-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
# .github/workflows/cicd-chromatic.yml
# Workflow name
name: 'Chromatic Publish'
# Event for the workflow
on:
push:
paths:
- ".github/workflows/cicd-chromatic.yml"
- "frontend/src/**/*.stories.jsx"
- "frontend/src/features/commonComponents/**"
- "frontend/src/features/commonStyles/**"
# List of jobs
jobs:
test:
# Operating System
runs-on: ubuntu-22.04
# Job steps
steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: npm
cache-dependency-path: ./frontend/package-lock.json
node-version: 18
- name: Install Node.js dependencies
run: npm ci
working-directory: ./frontend
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
# Options required for Chromatic's GitHub Action
with:
workingDir: frontend/
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}