Skip to content

Deploy Storybook

Deploy Storybook #64

name: Deploy Storybook
on:
push:
tags:
- '[1-9].*'
workflow_dispatch:
jobs:
deploy-storybook:
runs-on: ubuntu-latest
name: Deploy Storybook
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Build Storybook
run: yarn build-storybook
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: true
clean-exclude: |
CNAME
folder: storybook-static # The folder the action should deploy.