storybook workflows #1
This file contains hidden or 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: Build and Publish Storybook to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - 'main' # Change this to your main branch name if different | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.build-publish.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: build-publish | |
| uses: bitovi/[email protected] | |
| with: | |
| # Adjust these settings based on your project setup | |
| path: storybook-static # Output folder from the build-storybook command | |
| install_command: npm install # or yarn install | |
| build_command: npm run build-storybook # or yarn build-storybook |