Skip to content

Build and Publish storybook to GitHub Pages #16

Build and Publish storybook to GitHub Pages

Build and Publish storybook to GitHub Pages #16

Workflow file for this run

name: Build and Publish storybook to GitHub Pages
on:
push:
branches:
- "gh-pages"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Build
run: |
npm ci
npm run build-storybook
- name: Upload artifact
uses: actions/[email protected]
with:
path: storybook-static
deploy:
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GH Pages
id: deployment
uses: actions/deploy-pages@v3
with:
token: ${{ github.token }}