This document explains how the wedding website is deployed to GitHub Pages as a static site.
The website is deployed as a static Next.js export to GitHub Pages at: https://codestorm-hub.github.io/Sharothee-Wedding-arvinwedsincia/
- ✅ All public-facing pages (Home, Events, Gallery, Live, Travel)
- ✅ RSVP and Contact pages (with email fallback)
- ✅ SQLite database schema (for development reference)
- ✅ Responsive design and all UI features
- ✅ Static images and assets
- ❌ API routes (not supported in static export)
- ❌ Admin pages (require authentication)
- ❌ Server-side functionality (forms, database operations)
- ❌ NextAuth authentication
The static build uses a special process to exclude server-dependent features:
- Preparation:
scripts/prepare-static-build.shtemporarily moves API and admin directories - Build: Next.js exports the site to the
outdirectory with proper basePath - Restore:
scripts/restore-after-build.shbrings back the moved directories
# Local build for GitHub Pages
cd client
npm run build:static
# Output directory
# All static files are in ./out/output: 'export',
basePath: '/Sharothee-Wedding-arvinwedsincia',
assetPrefix: '/Sharothee-Wedding-arvinwedsincia',
trailingSlash: true,
images: {
unoptimized: true,
}- Development: SQLite at
prisma/dev.db - Production (GitHub Pages): No database (static content only)
- For full backend: Deploy to Hostinger VPS (see
HOSTINGER_VPS_DEPLOYMENT_PLAN.md)
The deployment is automated via .github/workflows/nextjs.yml:
- Checkout repository
- Setup Node.js 20
- Install dependencies
- Create environment file with secrets
- Generate Prisma client
- Run
npm run build:static - Upload
client/outdirectory to GitHub Pages - Deploy to GitHub Pages
To enable email functionality and proper builds, configure these repository secrets:
- WEB3FORMS_ACCESS_KEY: Free API key from Web3Forms for contact forms
- GMAIL_USER: Gmail email address for sending emails (e.g.,
your-email@gmail.com) - GMAIL_APP_PASSWORD: Gmail app password (NOT your regular password)
- Generate at: Google Account App Passwords
- Requires 2-Factor Authentication enabled
- GMAIL_FROM: Display name for sent emails (e.g.,
"Wedding <email@domain.com>") - TEST_EMAIL_TO: Test recipient email address
- Go to repository Settings → Secrets and variables → Actions
- Click New repository secret
- Add each secret with its name and value
- Secrets are encrypted and not visible after creation
Since API routes don't work in static export, forms have been modified:
- Shows success message with email contact information
- Suggests emailing:
arvincia@sparrow-group.com - Form validation still works client-side
- Shows success message with email contact information
- Suggests emailing:
arvincia@sparrow-group.com - Form validation still works client-side
To test the static build locally:
cd client
# Build the static site
npm run build:static
# Serve the out directory
cd out
python3 -m http.server 8000
# Visit: http://localhost:8000
# Note: Add basePath manually: http://localhost:8000/Sharothee-Wedding-arvinwedsincia/- Push changes to the
mainbranch - GitHub Actions workflow runs automatically
- Site builds and deploys to GitHub Pages
- Visit: https://codestorm-hub.github.io/Sharothee-Wedding-arvinwedsincia/
# From Actions tab in GitHub
1. Go to "Actions" tab
2. Select "Deploy Next.js site to Pages" workflow
3. Click "Run workflow"
4. Select branch and click "Run workflow"- Ensure GitHub Pages is enabled in repository settings
- Check that source is set to "GitHub Actions"
- Verify
.nojekyllfile exists inoutdirectory - Wait 2-3 minutes after deployment for changes to propagate
- Check that
.env.localfile exists with required variables - Ensure Prisma client is generated:
npx prisma generate - Verify all dependencies are installed:
npm install
- Check
next.config.tshas correct basePath - Ensure images are in
public/images/directory - Verify
.nojekyllfile prevents Jekyll processing
For full functionality with API routes and authentication:
- See
HOSTINGER_VPS_DEPLOYMENT_PLAN.md - Use MySQL database instead of SQLite
- Enable server-side features in
next.config.ts - Deploy to VPS with Node.js runtime
For issues or questions:
- Email: codestromhub@gmail.com
- Phone: +880 1234-567890
- Location: Dhaka, Bangladesh