Skip to content

Feature/storybook

Feature/storybook #10

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
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Remove node_modules and package-lock.json
run: rm -rf node_modules
rm -f package-lock.json
- name: Install dependencies
run: npm install
- name: Build Storybook
run: npm run build-storybook
- name: Deploy Storybook to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static