Lesson 17 / 25
Deployment and Distribution
Deploy Storybook as a static site, get preview URLs for pull requests and publish your components as an npm package.
Deployment options
Deploy Storybook to Vercel, Netlify, Chromatic, or any static hosting service. Each option provides different features like auto-preview links and integration with your CI/CD.
Build and deploy script
A typical deployment workflow involves building Storybook and pushing it to your hosting service.
#!/bin/bash
# Build Storybook for production
npm run build-storybook
# Deploy to your hosting provider
vercel storybook-static --prodComponent library distribution
Publish your components as an npm package while using Storybook as a showcase and documentation site.
Preview deployments
Use preview URLs for pull request review. Services like Vercel and Netlify provide automatic preview URLs for each PR.