Skip to content

Commit

Permalink
Add chromatic workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Jun 22, 2024
1 parent f8947eb commit 05b31bb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Chromatic"

on:
push:
paths:
- "frontend/**"
- ".github/workflows/frontend_ci.yml"

jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/frontend/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Corepack enable
run: corepack enable

- name: Install dependencies
run: yarn install --immutable

- name: Run Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

0 comments on commit 05b31bb

Please sign in to comment.