Browse Source

add github action for storybook

pull/4340/head
Shaunak 2 months ago
parent
commit
bc7c08ab17
  1. 48
      .github/workflows/build-storybook.yml

48
.github/workflows/build-storybook.yml

@ -0,0 +1,48 @@
name: Build and Deploy Storybook
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Storybook
run: npm run build:storybook
- name: Upload Storybook Artifact
uses: actions/upload-artifact@v3
with:
name: storybook
path: dist/storybook/ui
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download built Storybook
uses: actions/download-artifact@v3
with:
name: storybook
path: dist/storybook/ui
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist/storybook/ui
Loading…
Cancel
Save