This guide covers deploying Home Loan Optimizer to various free hosting platforms.
- GitHub account
- Repository pushed to GitHub
- Node.js installed locally
npm install --save-dev gh-pagesnpm run deployThat's it! Your app will be live at:
https://riteshkawadkar.github.io/home-loan-optimizer/
- Go to your repository on GitHub
- Click Settings → Pages
- Under "Source", select branch:
gh-pages - Click Save
- Wait 2-3 minutes for deployment
- Add a
CNAMEfile topublic/folder with your domain - In GitHub Settings → Pages, add your custom domain
- Update DNS records at your domain provider
- Install Vercel CLI:
npm install -g vercel- Deploy:
vercel- Follow prompts and you're done!
Live URL: https://your-project.vercel.app
- ✅ Automatic deployments on push
- ✅ Preview deployments for PRs
- ✅ Custom domains
- ✅ Analytics included
- Build your app:
npm run build- Go to Netlify Drop
- Drag the
distfolder - Done!
- Install Netlify CLI:
npm install -g netlify-cli- Deploy:
netlify deploy --prodLive URL: https://your-site.netlify.app
- ✅ Continuous deployment
- ✅ Form handling
- ✅ Serverless functions
- ✅ Split testing
- Go to Cloudflare Pages
- Connect your GitHub account
- Select repository:
home-loan-optimizer - Build settings:
- Build command:
npm run build - Build output:
dist
- Build command:
- Click Save and Deploy
Live URL: https://home-loan-optimizer.pages.dev
- ✅ Global CDN
- ✅ Unlimited bandwidth
- ✅ DDoS protection
- ✅ Web analytics
| Platform | Free Tier | Custom Domain | Build Time | CDN | Analytics |
|---|---|---|---|---|---|
| GitHub Pages | ✅ Unlimited | ✅ Yes | ~2 min | ✅ Yes | ❌ No |
| Vercel | ✅ 100GB/month | ✅ Yes | ~1 min | ✅ Yes | ✅ Yes |
| Netlify | ✅ 100GB/month | ✅ Yes | ~1 min | ✅ Yes | ✅ Yes |
| Cloudflare | ✅ Unlimited | ✅ Yes | ~2 min | ✅ Yes | ✅ Yes |
If you need environment variables:
Vite (.env file):
VITE_API_KEY=your_key_hereAccess in code:
const apiKey = import.meta.env.VITE_API_KEYAlready configured in vite.config.ts:
- Code splitting
- Tree shaking
- Minification
- Asset optimization
- Add
CNAMEfile topublic/folder:
yourdomain.com
- Update DNS records:
Type: A
Name: @
Value: 185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
Type: CNAME
Name: www
Value: riteshkawadkar.github.io
- Enable HTTPS in GitHub Settings
- Go to domain settings in dashboard
- Add your custom domain
- Update DNS records as instructed
- SSL certificate auto-generated
Create .github/workflows/deploy.yml:
name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./distNow every push to main auto-deploys!
Solution: Add public/_redirects (Netlify) or configure routing:
/* /index.html 200
Solution: Check base in vite.config.ts matches your URL path.
Solution:
# Clear cache and rebuild
rm -rf node_modules dist
npm install
npm run buildSolution: Clear browser cache or hard refresh (Ctrl+Shift+R)
- GitHub Pages: Check Actions tab for deployment status
- Vercel/Netlify: Dashboard shows deployment logs
- Analytics: Add Google Analytics or Plausible
Test your deployed site:
- Add
public/robots.txt:
User-agent: *
Allow: /
Sitemap: https://yourdomain.com/sitemap.xml
- Add meta tags in
index.html
Your app is now live and accessible worldwide!
Share your deployment:
- Update README with live URL
- Add to GitHub repository description
- Share on social media
- Submit to directories
- Use GitHub Pages for simplicity
- Use Vercel for best developer experience
- Use Netlify for forms and functions
- Use Cloudflare for maximum performance
All are excellent choices and 100% free for this project!
- Check deployment logs for errors
- Review platform documentation
- Open an issue on GitHub
- Ask in community forums
Happy deploying! 🚀