Deploy Dev
Use this skill for a development @convex-dev/static-hosting upload in the current repo.
Source of truth:
- Component repo:
https://github.com/get-convex/static-hosting - Component docs:
https://www.convex.dev/components/static-hosting
Portable Assumptions
- The current repo is a Convex app that uses
@convex-dev/static-hosting. - Prefer project scripts in
package.jsonwhen present. - The common static hosting component name is
staticHosting, but do not hard-code it if the repo defines another name. - Discover the component name from
convex/convex.config.tswhen needed by looking forapp.use(staticHosting, { name: "..." }). - If no component name is configured, use
staticHosting.
Required Rules
- Use this only when the user explicitly asks for dev.
- Do not update public metadata to the dev URL.
- Do not run
npm run buildseparately before static upload. Static-hosting's--buildflag injects the correctVITE_CONVEX_URL. - Do not deploy production backend functions from this workflow.
- Do not assume a specific Convex deployment URL. Read the URL from command output.
/deploydev Workflow
Confirm the user asked for dev.
Inspect available scripts:
npm runPrefer the repo script when available:
npm run deploy:static:devIf no script exists, discover the component name and run the static-hosting upload directly:
npx @convex-dev/static-hosting upload --build -c staticHosting --devReplace
staticHostingwith the configured component name if different.Confirm deploy output includes:
Deploying to development environment Your app is now available at: <dev convex site URL>Report the dev URL exactly as printed and remind that it is not the public/canonical app.
Troubleshooting
If the upload cannot find static-hosting functions, run the app's dev Convex workflow first, usually:
npx convex dev --onceIf the shell cannot reach Convex because of sandboxed network restrictions, rerun the same command with the required network approval.
When To Update Project Docs
Update docs only if deploy behavior changes:
README.mdchangelog.mdtask.mdfiles.md
If the deploy behavior change is non-trivial, create a PRD in prds/.