The Storybook logo isn't displaying properly #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |