Skip to content

Build and Deploy Storybook #115

Build and Deploy Storybook

Build and Deploy Storybook #115

Workflow file for this run

name: Build
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Build all libs together
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node lts
uses: actions/setup-node@v3
with:
node-version: 16.17.1
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build all modules
run: yarn build
- name: Build storybook
run: yarn run build-storybook
- name: Upload storybook artifact
uses: actions/upload-artifact@v2
with:
name: storybook
path: dist/storybook
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifact
uses: actions/download-artifact@v2
with:
name: build
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1
with:
token: ${{ github.token }}
folder: dist/storybook