Skip to content

Merge pull request #2 from uzabase/fix/storybook-url #7

Merge pull request #2 from uzabase/fix/storybook-url

Merge pull request #2 from uzabase/fix/storybook-url #7

name: Deploy Storybook
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22
- name: Build pages for main branch
run: |
git checkout main
npm ci
npm run build-storybook
env:
REPOSITORY_NAME: ${{ github.event.repository.name }}
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: storybook-static/
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4