/deploy-web-app¶
Deploy or debug a non-Python web app — a Vite/React SPA, a Next.js app, or a static site — to Vercel, Netlify, or Docker.
What It Does¶
- Verifies the app builds locally (
npm run build, plusnpm run previewfor a Vite SPA to smoke-test the production bundle). - Checks for common pre-deploy issues: secrets in client-exposed env vars,
untracked
.envfiles, hardcodedlocalhostURLs, build output committed to git. - Runs a secret scan before any push — a pushed token is burned even if removed later.
- Deploys to the requested target: Vercel, Netlify, or Docker.
- Adds a client-side routing rewrite for static SPAs so page refreshes don't 404.
- Verifies the deployment is live and pulls the platform's actual logs if it fails.
Example¶
$ npm run build
✓ built in 4.2s
$ npm run preview
✓ production build serves correctly on :4173
Checking for exposed secrets...
✓ No hardcoded tokens found
✓ .env is gitignored and not tracked
Deploying to Vercel...
✓ Live at https://order-tracker.vercel.app
Notes¶
- Anything prefixed
VITE_(Vite) orNEXT_PUBLIC_(Next.js) ships to the browser — never put a real secret in one of these. - Next.js deploys most smoothly on Vercel; other hosts need
next build && next startor theoutput: "standalone"mode. - For a deeper, history-inclusive secret scan, run Secrets Audit.