Skip to content

Storybook Deployment

Deploy the component documentation as a static site.

Build

npm run build:storybook

Outputs to storybook-static/ directory.

Platform Configuration

Platform Build Command Output Directory
Cloudflare Pages npm run build:storybook storybook-static
Vercel npm run build:storybook storybook-static
Netlify npm run build:storybook storybook-static
GitHub Pages (via workflow) storybook-static

Cloudflare Pages

  1. Connect your repository
  2. Configure build settings:
  3. Build command: npm run build:storybook
  4. Build output directory: storybook-static
  5. Deploy

Vercel

  1. Import your repository
  2. Configure build settings:
  3. Build command: npm run build:storybook
  4. Output directory: storybook-static
  5. Deploy

Netlify

  1. Connect your repository
  2. Configure build settings:
  3. Build command: npm run build:storybook
  4. Publish directory: storybook-static
  5. Deploy

Environment Variables

Only needed if you add private @scenarix/* packages as dependencies:

GITHUB_PKG_TOKEN=ghp_xxxxxxxxxxxx

GitHub Pages

The repository includes .github/workflows/storybook.yml which automatically deploys to GitHub Pages on push to main.

No additional configuration required - uses GITHUB_TOKEN automatically.