Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/storybook deploy #30

Merged
merged 15 commits into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
name: 'Chromatic Storybook Auto Deployment'

# Event for the workflow
on:
push:
paths: ['**.stories.tsx', '**.stories.ts', '**.stories.js', '**.stories.jsx']
on: pull_request

# List of jobs
jobs:
Expand All @@ -18,21 +16,33 @@ jobs:
fetch-depth: 0

- name: Setup Node.js environment
uses: actions/setup-node@v2.5.2 # Example of using a different action
uses: actions/setup-node@v3 # Example of using a different action
with:
node-version: lts/Hydrogen
node-version: 18

- name: Install pnpm
run: npm install -g pnpm@8.15.6

- name: Cache Dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-pnpm-

- name: Install Dependencies
run: pnpm install

- run: pnpm
- name: Run Chromatic
id: chromatic
uses: chromaui/action@latest # Update to the latest version of Chromatic action
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: comment PR
uses: thollander/actions-comment-pull-request@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: '🚀 Storybook 자동 배포 URL: ${{ steps.chromatic.outputs.storybookUrl }}'
Loading