Compare commits

...
Author SHA1 Message Date
abeatrix 672eaafca7 format 2025-09-17 15:17:52 -07:00
abeatrix f0e950ac48 fix 2025-09-17 15:15:58 -07:00
abeatrix d93afb8f68 ci: add GitHub Actions workflow to deploy Storybook to Pages
Add automated deployment of Storybook documentation to GitHub Pages on main branch pushes. Configures workflow to build from webview-ui directory and deploy static files using bitovi/github-actions-storybook-to-github-pages action.
2025-09-17 13:03:24 -07:00
2 changed files with 57 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
# Source: https://storybook.js.org/docs/sharing/publish-storybook#github-pages
name: Publish Storybook to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Manual Checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Set up Node
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install root dependencies
run: npm ci --include=optional
- name: Install webview dependencies
run: cd webview-ui && npm ci --include=optional
- name: Build Tests and Extension
run: npm run pretest
#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
- uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
with:
build_command: cd webview-ui && npm run build-storybook
path: webview-ui/storybook-static
checkout: false
+14
View File
@@ -1,3 +1,4 @@
import { resolve } from "node:path"
import type { StorybookConfig } from "@storybook/react-vite"
const config: StorybookConfig = {
@@ -16,6 +17,19 @@ const config: StorybookConfig = {
},
}
// Add path aliases to match the main Vite config
config.resolve = {
...config.resolve,
alias: {
...config.resolve?.alias,
"@": resolve(__dirname, "../src"),
"@components": resolve(__dirname, "../src/components"),
"@context": resolve(__dirname, "../src/context"),
"@shared": resolve(__dirname, "../../src/shared"),
"@utils": resolve(__dirname, "../src/utils"),
},
}
return config
},
typescript: {