Skip to content

Feature/storybook

Feature/storybook #4

Workflow file for this run

name: Build and Publish Storybook to GitHub Pages
on: #main으로 push되면 실행
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
build-storybook:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm install
- name: Build Storybook
run: npm build-storybook
- name: Deploy Storybook to GitHub Pages
if: matrix.node-version == 18
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static