From a98d45897385a0897e4a31157a96cab90ce614d2 Mon Sep 17 00:00:00 2001 From: ingdaeho Date: Wed, 6 Mar 2024 14:01:31 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20storybook=20=EB=B0=B0=ED=8F=AC=20github?= =?UTF-8?q?=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/chromatic.yml | 22 ++++++++++++++++++++++ .storybook/main.ts | 19 +++++++++++-------- 2 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/chromatic.yml 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;