-
Install Vercel CLI:
npm install -g vercel
-
Deploy:
vercel
-
Add environment variables in Vercel Dashboard:
- Go to your project settings
- Add
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEY
OR Deploy via GitHub:
- Push code to GitHub
- Go to https://vercel.com
- Import your repository
- Add environment variables
- Deploy
-
Install Netlify CLI:
npm install -g netlify-cli
-
Deploy:
netlify deploy --prod
-
Add environment variables in Netlify Dashboard
OR Deploy via GitHub:
- Push code to GitHub
- Go to https://netlify.com
- Import your repository
- Build command:
npm run build - Publish directory:
dist - Add environment variables
-
Build the project:
npm install npm run build
-
Upload the
distfolder to your web host -
Configure environment variables on your hosting platform
-
Ensure your server serves
index.htmlfor all routes (SPA routing)
Your hosting platform needs these environment variables:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
- The
.envfile is NOT included in the zip for security - You'll need to recreate it or add environment variables directly to your hosting platform
- The
node_modulesfolder is NOT included (it will be installed during build) - Supabase database is already configured and running
- Node.js 18 or higher
- npm 9 or higher
After deployment, test:
- All pages load correctly
- Footer links work
- Contact form submissions
- Newsletter subscriptions
- Navigation between pages
Your Supabase database is already set up with:
- Contact submissions table
- Newsletter subscriptions table
- CMS tables for content management
Make sure to add the environment variables from your .env file to your hosting platform's configuration.