Skip to content

Commit

Permalink
add Chromatic to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed May 6, 2024
1 parent fd903c2 commit ebc0321
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/chromatic.yml
@@ -0,0 +1,25 @@
name: 'Chromatic'

on: push

jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install dependencies
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install dependencies
run: pnpm install

- name: Run Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
4 changes: 4 additions & 0 deletions chromatic.config.json
@@ -0,0 +1,4 @@
{
"projectId": "Project:66228a3205a9e64e345243d6",
"zip": true
}
4 changes: 2 additions & 2 deletions components/sidebar.stories.tsx
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react'
import { notes } from '#prisma/mock-data';
import Sidebar from "./sidebar";
import { createNotes } from '#mocks/notes';

const meta = {
component: Sidebar,
Expand All @@ -11,7 +11,7 @@ export default meta;
type Story = StoryObj<typeof meta>
export const Default: Story = {
args: {
notes: notes,
notes: createNotes(),
children: null
}
}
Expand Down

0 comments on commit ebc0321

Please sign in to comment.