I want to automatically run tests and type-checking before each deployment to Vercel. Currently I just push to main and Vercel deploys automatically, but sometimes broken code gets deployed.
My stack: Next.js 14, TypeScript, Vitest for tests. How do I set up GitHub Actions to block the deployment if tests fail?
Tom Kowalski
asked 1 months ago1
Answers18
Upvotes3100
ViewsI'm using .env files with dotenv but I'm not sure about best practices for managing different environments. My concerns:
.env.development, .env.staging, .env.production?1
Answers38
Upvotes5501
Views