Skip to content

update the publish stoybook action flow #5

update the publish stoybook action flow

update the publish stoybook action flow #5

name: Deploy Storybook to GitHub Pages
on:
push:
branches:
- main # Adjust if your default branch is different
pull_request:
branches:
- main # Optional: for PRs to the main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Adjust to your Node.js version
cache: 'npm'
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm install
- name: Build Storybook
run: npm run build-storybook
- name: List contents of Storybook build directory
run: ls -la ./storybook/storybook-static
- name: Ensure proper permissions
run: chmod -R 755 ./storybook/storybook-static
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook/storybook-static