Sanity Studio
Sanity Studio lives in thestudio/ workspace and is deployed to Sanity’s managed CDN — a globally distributed hosting service included with every Sanity project.
Deploy
- Builds the Studio for production
- Uploads the static bundle to Sanity’s CDN
- Makes it available at
https://<project-id>.sanity.studio/
The
--workspace=studio flag targets the studio npm workspace. Run this from the monorepo root.When to redeploy
Redeploy the Studio when you:- Add or modify schema types in
studio/src/schemaTypes/ - Update Studio configuration in
studio/sanity.config.ts - Change the Presentation (Visual Editing) tool setup
- Update the Studio version (
@sanity/...packages)
npx sanity schema deploy first (to push to Sanity’s Content Lake), then npx sanity deploy --workspace=studio to update the hosted Studio UI.
Studio URL
The deployed Studio URL is set asPUBLIC_SANITY_STUDIO_URL in the Cloudflare Pages environment variables. The Astro app uses this URL to configure Visual Editing overlays.
Schema deployment
Always deploy the schema before deploying the Studio:Storybook → GitHub Pages
Storybook is deployed to GitHub Pages athttps://gsinghjay.github.io/astro-shadcn-sanity/. It serves as the living component library — every fulldev/ui block variant has a story with demo data.
Automatic deployment
The.github/workflows/deploy-storybook.yml workflow deploys Storybook automatically on every push to main that touches component files:
paths filter prevents unnecessary Storybook builds when only non-component files change (e.g., studio/ changes, docs updates).
Manual trigger
You can also trigger a Storybook deployment manually from the Actions tab on GitHub:- Go to Actions → Deploy Storybook to GitHub Pages
- Click Run workflow → select
main→ Run workflow
How the workflow runs
STORYBOOK_BASE_PATH environment variable is set to /astro-shadcn-sanity/ so the static bundle uses the correct base URL for GitHub Pages.
Required permissions
The workflow requires these GitHub Actions permissions on the repository:Build output
Thebuild-storybook command outputs to astro-app/storybook-static/. This directory is uploaded as the Pages artifact and deployed to GitHub Pages.
Concurrency
The workflow uses apages concurrency group:
cancel-in-progress: false ensures in-flight deployments complete before a new one starts, preventing partial updates to GitHub Pages.