Skip to content

The Storybook logo isn't displaying properly #33

The Storybook logo isn't displaying properly

The Storybook logo isn't displaying properly #33

name: Deploy Storybook
on:
pull_request:
branches:
- main
jobs:
deploy-storybook:
name: Deploy Storybook
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
run: |
yarn install --frozen-lockfile
- name: Build Storybook
env:
NEXT_PUBLIC_BASE_STORYBOOK_URL: ${{ github.server_url }}/${{ github.repository }}/gh-pages
run: |
yarn build:storybook
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
mkdir gh-pages
cp -r storybook-static/* gh-pages/
git checkout --orphan gh-pages
git --work-tree=gh-pages add --all
git --work-tree=gh-pages commit -m "Deploy Storybook"
git push -f origin gh-pages