Skip to content

Deploy Storybook

Deploy Storybook #17

name: "Deploy Storybook"
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [next]
paths:
- .storybook/**
- package.json
- src/ui-components/**
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "yarn"
- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile --immutable
- name: Build storybook
run: yarn build-storybook
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: storybook-static
target-folder: docs/storybook