Skip to content

Separate example client subpackage (#182) #44

Separate example client subpackage (#182)

Separate example client subpackage (#182) #44

name: Build and Publish storybook to GitHub Pages
on:
push:
branches:
- "main"
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["20.x"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: |
args: [ --force ]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install server dependencies
run: |
python -m pip install --upgrade pip
if [ -f server/requirements.txt ]; then pip install -r server/requirements.txt; fi
- name: Generate OpenAPI JSON
run: |
PYTHONPATH=server python server/davidia/generate_openapi.py
- name: Set Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Build and publish
id: build-publish
uses: bitovi/[email protected]
with:
checkout: false
path: storybook/storybook-static
install_command: echo Already done
build_command: pnpm run docs && pnpm build:storybook