Your setup is configured for automatic deployment. Here's how it works:
- Edit your code in your IDE
- Test locally using
npm run dev - Your local
.envfile uses:VITE_API_URL=https://two9-team-rocket.onrender.com
git add .
git commit -m "Your commit message"
git push origin main- Render detects the push (because of
autoDeployTrigger: commitinrender.yaml) - Automatically builds and deploys your changes
- Takes 3-5 minutes for deployment
Your .gitignore correctly excludes:
.envfiles (contains your Supabase keys)node_modules/dist/(build output)
You MUST set these in Render Dashboard (not just in .env file):
- Go to https://render.com/dashboard
- Click on your backend service
- Go to "Environment" tab
- Set these variables:
SUPABASE_URL=https://ovisawqwfapvmedivuam.supabase.coSUPABASE_ANON_KEY=sb_publishable_EMqpn0IxVO1CpA3Su2l-FQ_8vsM_O0dSUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...(your full key)NODE_ENV=productionPORT=10000
- Go to https://render.com/dashboard
- Click on your frontend service
- Go to "Environment" tab
- Set these variables:
VITE_API_URL=https://two9-team-rocket.onrender.comNODE_ENV=production
# 1. Make your code changes
# Edit files in your IDE
# 2. Test locally
npm run dev
# Visit http://localhost:5173 (or whatever port Vite shows)- Test the feature you're working on
- Check browser console for errors
- Verify API calls work (they'll go to your Render backend)
# Stage your changes
git add .
# Commit with a descriptive message
git commit -m "Add new feature: [describe what you did]"
# Push to GitHub
git push origin main- Go to https://render.com/dashboard
- Watch your services deploy automatically
- Check the "Logs" tab if there are any issues
- Wait 3-5 minutes for deployment to complete
- Visit your deployed frontend URL
- Test the changes you made
- Check that everything works as expected
- ✅ Test locally before pushing
- ✅ Write clear commit messages
- ✅ Push frequently (small commits are better)
- ✅ Check Render logs if deployment fails
- ✅ Keep environment variables in Render dashboard (not in Git)
- ❌ Commit
.envfiles (already in.gitignore) - ❌ Commit
node_modules/(already in.gitignore) - ❌ Commit sensitive keys or passwords
- ❌ Push broken code (test first!)
git status
# Should NOT show .env file- Go to Render dashboard
- Click on each service
- Go to "Environment" tab
- Verify all required variables are set
Solution:
- Check Render dashboard for deployment status
- Verify
autoDeployTrigger: commitis inrender.yaml - Check if there are any build errors in Render logs
Solution:
- Check Render logs for specific error
- Test build locally:
npm run build - Verify all dependencies are in
package.json
Solution:
- Verify variables are set in Render dashboard (not just
.env) - Restart the service after adding new variables
- Check variable names match exactly (case-sensitive)
Solution:
- Local uses
.envfile - Production uses Render environment variables
- Make sure both are configured correctly
| Action | Local | Production |
|---|---|---|
| Environment File | .env |
Render Dashboard |
| API URL | VITE_API_URL in .env |
VITE_API_URL in Render |
| Test | npm run dev |
Visit deployed URL |
| Deploy | N/A | Automatic on git push |
# 1. Make a change (e.g., update a component)
# Edit src/components/Login.jsx
# 2. Test locally
npm run dev
# Test in browser at http://localhost:5173
# 3. If it works, commit and push
git add src/components/Login.jsx
git commit -m "Update login form styling"
git push origin main
# 4. Wait for Render to deploy (3-5 min)
# Check https://render.com/dashboard
# 5. Verify on production
# Visit https://food-delivery-frontend.onrender.comYes, your workflow will work perfectly!
- ✅
.envis in.gitignore(secure) - ✅
autoDeployTrigger: commitis set (auto-deploy) - ✅ Environment variables need to be in Render dashboard
- ✅ Just push to Git and Render deploys automatically
Your workflow: Make changes → Test locally → Push to Git → Auto-deploy to Render → Done! 🎉