Skip to content

add loading and error components #278

add loading and error components

add loading and error components #278

Workflow file for this run

name: Storybook lib
env:
NODE_VERSION: 20.4.0
PNPM_VERSION: 8
on:
push:
branches:
- '*'
paths:
- 'lib/**'
- 'pnpm*.yaml'
- 'package*.json'
- '.github/workflows/**'
tags:
- 'v*'
pull_request:
paths:
- 'lib/**'
- 'pnpm*.yaml'
- 'package*.json'
- '.github/workflows/**'
jobs:
storybook:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: ${{ env.PNPM_VERSION }}
run_install: false
- name: Get pnpm cache directory
id: pnpm-cache
shell: bash
run: |
echo "directory=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache pnpm dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.directory }}
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-cache-
- name: Install pnpm dependencies
run: pnpm install
- name: Build Storybook
run: pnpm --filter "@helpwave/common" run build-storybook
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PAGE_PROJECT_NAME }}
directory: lib/storybook-static