Deployment Guide
VozCraft is a static web application that can be deployed to any static hosting platform. This guide covers deployment to popular hosting services including GitHub Pages, Vercel, Netlify, and traditional web servers.Prerequisites
Before deploying, ensure you have:Build the application
dist/ directory with production-ready files.Test the build locally
Verify build output
dist/ contains:index.htmlmanifest.jsonassets/directory with JS bundles- Images (
logo.png,logotipo.png)
Vercel Deployment
Vercel provides zero-configuration deployment with automatic builds and global CDN.Method 1: Vercel CLI
Install Vercel CLI
Login to Vercel
Deploy
- Detect the project as a Vite application
- Build automatically
- Deploy to a preview URL
Deploy to production
Method 2: Vercel Dashboard
Connect repository
- Go to vercel.com
- Click “Add New” → “Project”
- Import your GitHub/GitLab/Bitbucket repository
Configure build settings
- Framework Preset: Vite
- Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
Deploy
Vercel Configuration File
Vercel Configuration File
vercel.json for custom configuration:- ✅ Automatic builds on git push
- ✅ Preview deployments for PRs
- ✅ Global CDN (Edge Network)
- ✅ Automatic HTTPS
- ✅ Zero configuration
- ✅ Free tier available
Netlify Deployment
Netlify offers similar features to Vercel with easy drag-and-drop deployment.Method 1: Netlify CLI
Install Netlify CLI
Login to Netlify
Initialize site
Deploy
Method 2: Netlify Dashboard
Connect repository
- Go to netlify.com
- Click “Add new site” → “Import an existing project”
- Connect your Git provider and select repository
Configure build
- Base directory: (leave empty)
- Build command:
npm run build - Publish directory:
dist
Deploy
Method 3: Drag and Drop
Build locally
Upload dist folder
- Go to Netlify Dashboard
- Drag and drop the
dist/folder onto the upload area - Netlify deploys instantly
Netlify Configuration File
Netlify Configuration File
netlify.toml for custom configuration:- ✅ Automatic builds on git push
- ✅ Deploy previews for PRs
- ✅ Global CDN
- ✅ Automatic HTTPS
- ✅ Form handling
- ✅ Serverless functions
- ✅ Free tier available
GitHub Pages Deployment
Deploy VozCraft directly from your GitHub repository.Method 1: GitHub Actions (Recommended)
Create.github/workflows/deploy.yml:
Enable GitHub Pages
- Go to repository Settings → Pages
- Source: “GitHub Actions”
Push workflow file
Wait for deployment
Access deployed site
Method 2: gh-pages Package
Install gh-pages
Add deploy script
package.json:Deploy
gh-pages branch.Configure GitHub Pages
- Go to Settings → Pages
- Source: “Deploy from a branch”
- Branch:
gh-pages→/ (root) - Save
Traditional Web Server Deployment
Nginx
Configuration for serving VozCraft on Nginx:Upload build files
Configure Nginx
Set up SSL (Let's Encrypt)
Apache
Configuration for Apache web server:Enable required modules
Enable site
Cloud Storage Deployment
AWS S3 + CloudFront
Create S3 bucket
Enable static website hosting
Upload build
Set up CloudFront
- Create CloudFront distribution
- Origin: S3 bucket
- Default root object:
index.html - Custom error responses: 404 → /index.html (200)
Configure custom domain (optional)
- Create SSL certificate in ACM
- Add CNAME to CloudFront distribution
- Update Route 53 DNS
Deployment Checklist
Pre-deployment checks
npm run build successfully☐ Test with npm run preview☐ Verify all features work☐ Check browser console for errors☐ Test on mobile devices☐ Run Lighthouse auditConfiguration
base URL in vite.config.js☐ Update environment variables if needed☐ Configure caching headers☐ Set up SSL/HTTPS☐ Configure SPA routing fallbackPost-deployment
Performance Optimization
CDN Configuration
Optimal cache headers for different file types:Compression
Enable gzip and Brotli compression:Security Headers
Monitoring
Error Tracking
Integrate error tracking (optional):Analytics
Add analytics tracking:Rollback Strategy
Always maintain ability to rollback:Vercel/Netlify
- Automatic deployment history
- Instant rollback via dashboard
- Pin deployments to specific commits
Manual Deployments
Common Deployment Issues
404 on page refresh
404 on page refresh
index.html:Assets not loading
Assets not loading
vite.config.js:CORS errors
CORS errors
