PlotPulse Deployment Guide - GitHub Pages
This guide will help you deploy the PlotPulse frontend to GitHub Pages at plotpulse.syrez.co.in.
Prerequisites
- GitHub repository set up
- GoDaddy account with domain
syrez.co.in
- Backend API accessible publicly (see Backend Access section below)
Step 1: GitHub Repository Setup
1.1 Enable GitHub Pages
- Go to your GitHub repository
- Click Settings → Pages
- Under Source, select:
- Click Save
Important: If your repository is NOT named plot-pulse, you need to update the base path:
- Check your repository name (e.g.,
plot-pulse, plotpulse, etc.)
- If different, update
frontend/vite.config.ts:
base: process.env.GITHUB_PAGES === 'true' ? '/your-repo-name/' : '/',
Step 2: Set GitHub Secrets (Optional but Recommended)
If you want to use a different API URL than the default:
- Go to Settings → Secrets and variables → Actions
- Click New repository secret
- Add:
- Name:
VITE_API_BASE_URL
- Value:
https://your-backend-api-url.com/api/v1
- Click Add secret
Note: If you don’t set this, the workflow will use http://localhost:8091/api/v1 (which won’t work from GitHub Pages).
Step 3: GoDaddy DNS Configuration
3.1 Access DNS Management
- Log in to your GoDaddy account
- Go to My Products → Domains
- Click DNS next to
syrez.co.in
3.2 Add CNAME Record
Add a CNAME record to point your subdomain to GitHub Pages:
- Click Add in the DNS Records section
- Select CNAME as the record type
- Fill in:
- Name:
plotpulse
- Value:
your-username.github.io (replace your-username with your GitHub username)
- TTL:
600 (or default)
- Click Save
Example:
- If your GitHub username is
john, the value should be: john.github.io
- This will make
plotpulse.syrez.co.in point to your GitHub Pages site
3.3 Wait for DNS Propagation
- DNS changes can take 5 minutes to 48 hours to propagate
- Usually takes 15-30 minutes
- You can check propagation at: https://www.whatsmydns.net/
Step 4: Configure Custom Domain in GitHub
After DNS propagates:
- Go to your repository → Settings → Pages
- Under Custom domain, enter:
plotpulse.syrez.co.in
- Check Enforce HTTPS (GitHub will provision SSL certificate)
- Click Save
Note: GitHub will automatically create a CNAME file in your repository. This is normal.
Step 5: Deploy
Option A: Automatic Deployment (Recommended)
- Push the code to the
main branch:
git add .
git commit -m "Setup GitHub Pages deployment"
git push origin main
- GitHub Actions will automatically:
- Build the frontend
- Deploy to GitHub Pages
- Make it available at
https://plotpulse.syrez.co.in
- Check deployment status:
- Go to Actions tab in your repository
- You’ll see the deployment workflow running
Option B: Manual Deployment
- Go to Actions tab
- Select Deploy Frontend to GitHub Pages
- Click Run workflow
- Select branch:
main
- Click Run workflow
Step 6: Verify Deployment
- Wait 2-5 minutes for deployment to complete
- Visit:
https://plotpulse.syrez.co.in
- Check browser console for any errors
- Verify the app loads correctly
⚠️ Important: Backend Access Issue
Current Situation
Your backend is running locally (http://localhost:8091), but the frontend on GitHub Pages cannot access localhost. You have two options:
Option 1: Use a Tunneling Service (Temporary)
Use a service like ngrok to expose your local backend:
- Install ngrok: https://ngrok.com/
- Run:
ngrok http 8091
- Copy the HTTPS URL (e.g.,
https://abc123.ngrok.io)
- Update GitHub secret
VITE_API_BASE_URL to: https://abc123.ngrok.io/api/v1
- Redeploy frontend
Note: Free ngrok URLs change on restart. Consider paid plan for stable URL.
Option 2: Deploy Backend (Recommended)
Deploy your backend to a cloud service:
- Railway: https://railway.app (free tier available)
- Render: https://render.com (free tier available)
- Fly.io: https://fly.io (free tier available)
- Heroku: https://heroku.com (paid)
Then update VITE_API_BASE_URL to point to your deployed backend.
Option 3: Update Backend CORS
If you deploy the backend later, make sure to:
- Update
backend/src/main/resources/application-prod.yml:
cors:
allowed-origins:
- https://plotpulse.syrez.co.in
- Set environment variable:
FRONTEND_URL=https://plotpulse.syrez.co.in
Troubleshooting
Issue: 404 Error on Page Refresh
Solution: GitHub Pages serves static files. For React Router to work:
- The
vite.config.ts already has the base path configured
- Make sure your repository name matches the base path
- GitHub Pages should handle this automatically with the workflow
Issue: API Calls Failing
Check:
- Browser console for CORS errors
- Network tab to see the actual API URL being called
- Backend CORS configuration includes
https://plotpulse.syrez.co.in
Issue: Custom Domain Not Working
Check:
- DNS propagation: https://www.whatsmydns.net/#CNAME/plotpulse.syrez.co.in
- GitHub Pages settings show the custom domain
- Wait up to 24 hours for full propagation
Issue: Build Fails
Check:
- GitHub Actions logs for specific errors
- Ensure all dependencies are in
package.json
- Node.js version compatibility (workflow uses Node 18)
File Structure After Deployment
your-repo/
├── .github/
│ └── workflows/
│ └── deploy-frontend.yml ✅ Created
├── frontend/
│ ├── vite.config.ts ✅ Updated (base path)
│ ├── index.html ✅ Updated (og:url)
│ └── .env.production ⚠️ Created by workflow
└── DEPLOYMENT_GUIDE.md ✅ This file
Next Steps
- ✅ Push code to GitHub
- ✅ Configure DNS in GoDaddy
- ✅ Set up backend access (tunneling or deployment)
- ✅ Update
VITE_API_BASE_URL secret if needed
- ✅ Verify deployment works
- ⚠️ Deploy backend to a cloud service (recommended)
Quick Reference
GitHub Pages URL
- Before custom domain:
https://your-username.github.io/plot-pulse/
- After custom domain:
https://plotpulse.syrez.co.in
API URL Configuration
- Development:
http://localhost:8091/api/v1
- Production: Set via GitHub secret
VITE_API_BASE_URL
DNS Record
- Type: CNAME
- Name:
plotpulse
- Value:
your-username.github.io
- TTL: 600
Last Updated: Based on current GitHub Pages and Vite configuration