Skip to content

Commit

Permalink
update the publish stoybook action flow
Browse files Browse the repository at this point in the history
  • Loading branch information
devPragnenkumar committed Aug 21, 2024
1 parent 774a94a commit 8ec584d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/publish-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ name: Deploy Storybook to GitHub Pages
on:
push:
branches:
- main # Trigger on push to the main branch (change this to your default branch if different)
- main # Adjust if your default branch is different
pull_request:
branches:
- main # Trigger on pull requests to the main branch (optional)
defaults:
run:
shell: bash
working-directory: ./storybook
- main # Optional: for PRs to the main branch

jobs:
build:
Expand All @@ -23,7 +19,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Specify your Node.js version
node-version: 18 # Adjust to your Node.js version
cache: 'npm'
registry-url: https://registry.npmjs.org

Expand All @@ -33,8 +29,14 @@ jobs:
- 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-static
publish_dir: ./storybook/storybook-static

0 comments on commit 8ec584d

Please sign in to comment.