Updating schema and associated data in Sanity Studio
When you update your schema in GitHub and push it to the main branch, you need to deploy your Studio for those schema changes to take effect. Here's what you need to do:
Pull the changes locally: First, pull your updated schema from GitHub to your local development environment:
git pull origin mainDeploy your Studio: Run the deployment command from your project directory:
sanity deployOr if you're using npm scripts:
npm run deploy # or pnpm run deploy
The sanity deploy command does two important things:
- Builds and deploys your Studio interface to your
*.sanity.studiohosted URL - Deploys an up-to-date version of your schema types to Sanity's platform
This schema deployment is important because other parts of the Sanity Content Operating System (like AI Agent Actions and other features) rely on the deployed schema, not just the files in your repository.
If you're hosting your Studio on another platform like Vercel or Netlify instead of using sanity deploy, you'll need to trigger a rebuild on that platform. However, keep in mind that using sanity deploy is the recommended approach because it automatically handles schema deployment and integrates seamlessly with Sanity's platform features.
Note: If you're using GitHub Actions or another CI/CD pipeline, the deployment might happen automatically when you push to main, depending on your workflow configuration. Check if you have any automation set up in your .github/workflows directory.
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.