Build Your Site
Before deploying, build your Evidence app:build directory containing your static site.
What’s in the Build Directory
Thebuild directory contains:
Platform-Specific Guides
GitHub Pages
AWS S3 + CloudFront
Cloudflare Pages
npm run sources && npm run buildbuildFirebase Hosting
Azure Static Web Apps
Custom Server
Deploy to your own server using any web server:Nginx
Apache
Deploy via SCP
Deploy via Rsync
Performance Optimization
Caching Strategy
Configure caching headers for optimal performance:- Immutable assets (
_app/immutable/*): Cache for 1 year - Data files (
data/*): Cache based on your data refresh frequency - HTML files: No cache or short cache (for latest content)
Compression
Enable gzip or Brotli compression on your server:CDN
Use a CDN for global distribution:- Cloudflare
- AWS CloudFront
- Azure CDN
- Fastly
Continuous Deployment
Using GitHub Actions
Generic deployment workflow:Troubleshooting
404 Errors on Page Refresh
Configure your server to serveindex.html for all routes, or ensure pre-rendering is enabled.
Assets Not Loading
Check your base path configuration if deploying to a subdirectory.Slow Initial Load
- Enable compression (gzip/Brotli)
- Use a CDN
- Optimize data file sizes
- Check network waterfall in browser DevTools
Next Steps
- Configure base paths for subdirectory hosting
- Set up rendering modes
- Implement automated data refreshes with scheduled builds