Skip to content

Commit

Permalink
feat(editor): Setup Chromatic for design-system (no-changelog) (#8870)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy authored Mar 15, 2024
1 parent a5261d6 commit 9d24f33
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Chromatic

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v4.0.1
with:
node-version: 18.x
cache: 'pnpm'
- run: pnpm install --frozen-lockfile

- name: Publish to Chromatic
uses: chromaui/action@latest
with:
workingDir: packages/design-system
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ cypress/downloads/*
*.swp
CHANGELOG-*.md
*.mdx
build-storybook.log
1 change: 1 addition & 0 deletions packages/@n8n/storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { StorybookConfig } from '@storybook/vue3-vite';
export const sharedConfig: StorybookConfig = {
stories: ['../src/**/*.stories.ts'],
addons: [
'@chromatic-com/storybook',
'@storybook/addon-a11y',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
Expand Down
2 changes: 2 additions & 0 deletions packages/@n8n/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@n8n/storybook",
"private": true,
"devDependencies": {
"@chromatic-com/storybook": "^1.2.18",
"@storybook/addon-a11y": "^8.0.0",
"@storybook/addon-actions": "^8.0.0",
"@storybook/addon-docs": "^8.0.0",
Expand All @@ -12,6 +13,7 @@
"@storybook/test": "^8.0.0",
"@storybook/vue3": "^8.0.0",
"@storybook/vue3-vite": "^8.0.0",
"chromatic": "^11.0.8",
"storybook": "^8.0.0"
}
}
4 changes: 4 additions & 0 deletions packages/design-system/chromatic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"projectId": "Project:65f085d72c13e4e1154414db",
"buildScriptName": "build:storybook"
}
1 change: 1 addition & 0 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"test:dev": "vitest",
"build:storybook": "storybook build",
"storybook": "storybook dev -p 6006",
"chromatic": "chromatic",
"format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint src --ext .js,.ts,.vue --quiet",
"lintfix": "eslint src --ext .js,.ts,.vue --fix"
Expand Down
64 changes: 62 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9d24f33

Please sign in to comment.