diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml new file mode 100644 index 000000000..db0c689bd --- /dev/null +++ b/.github/workflows/chromatic.yml @@ -0,0 +1,22 @@ +# Workflow name +name: 'Chromatic Deployment' + +# Event for the workflow +on: push + +# List of jobs +jobs: + test: + # Operating System + runs-on: ubuntu-latest + # Job steps + steps: + - uses: actions/checkout@v1 + - run: yarn + #👇 Adds Chromatic as a step in the workflow + - uses: chromaui/action@v1 + # Options required for Chromatic's GitHub Action + with: + #👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/ko/deploy/ to obtain it + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + token: ${{ secrets.TOKEN }} diff --git a/.storybook/main.ts b/.storybook/main.ts index 6d68d18ca..f8a7f7767 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,19 +1,22 @@ -import type { StorybookConfig } from "@storybook/react-vite"; +import type { StorybookConfig } from '@storybook/react-vite'; const config: StorybookConfig = { - stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], + stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], addons: [ - "@storybook/addon-links", - "@storybook/addon-essentials", - "@storybook/addon-onboarding", - "@storybook/addon-interactions", + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-onboarding', + '@storybook/addon-interactions', ], framework: { - name: "@storybook/react-vite", + name: '@storybook/react-vite', options: {}, }, docs: { - autodocs: "tag", + autodocs: 'tag', + }, + core: { + builder: '@storybook/builder-vite', }, }; export default config;