Merge pull request #2 from uzabase/fix/storybook-url #7
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: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Build pages for main branch | |
run: | | |
git checkout main | |
npm ci | |
npm run build-storybook | |
env: | |
REPOSITORY_NAME: ${{ github.event.repository.name }} | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: storybook-static/ | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |