Skip to content

Deploy Storybook

Deploy Storybook #2

Workflow file for this run

name: Deploy Storybook
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci --prefer-offline --force
- run: npm run build:storybook
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: storybook-static
# Deployment job
deploy:
timeout-minutes: 30
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4