Deployment methods
GitHub integration (recommended)
Best for: Most teams Automatic deployments triggered by Git pushes. Pros:- Automatic deployments on push
- Preview deployments for pull requests
- Full Git history and version control
- Team collaboration through PRs
- No manual deployment steps
- Requires GitHub account
- Deployment depends on GitHub availability
- Connect repository in dashboard
- Install GitHub App
- Push changes to deploy
GitLab integration
Best for: Teams using GitLab Similar to GitHub with GitLab-specific features. Pros:- Automatic deployments on push
- Works with self-hosted GitLab
- GitLab CI/CD integration
- Team collaboration
- Requires GitLab account
- Fewer integrations than GitHub
- Connect repository in dashboard
- Configure GitLab integration
- Push changes to deploy
CI/CD deployment
Best for: Custom workflows, monorepos Deploy from any CI/CD system using the API. Pros:- Works with any Git provider
- Custom deployment logic
- Integration with existing CI/CD
- Monorepo support
- Requires API key management
- Manual CI/CD configuration
- No automatic preview deployments
- Generate API key in dashboard
- Configure CI/CD pipeline
- Call deployment API
Hosting configurations
Mintlify subdomain
Best for: Quick setup, testing Your docs atyour-project.mintlify.app.
Pros:
- Instant setup
- Free SSL certificate
- No DNS configuration
- Automatic CDN
- Mintlify branding in URL
- Can’t customize domain
Custom domain
Best for: Production documentation Your docs atdocs.yourcompany.com.
Pros:
- Professional appearance
- Your branding
- SEO benefits
- Custom SSL certificate
- Requires DNS configuration
- 24-48 hour DNS propagation
- Add domain in dashboard
- Update DNS records (CNAME)
- Wait for SSL certificate
Subpath hosting
Best for: Unified domain structure Your docs atyourcompany.com/docs.
Pros:
- Unified domain
- Consistent branding
- SEO consolidation
- Existing domain authority
- More complex setup
- Requires reverse proxy or CDN
- Additional configuration
Comparison table
| Feature | GitHub | GitLab | CI/CD | Mintlify Domain | Custom Domain | Subpath |
|---|---|---|---|---|---|---|
| Setup time | 5 min | 5 min | 15 min | Instant | 24-48 hrs | 1-2 hrs |
| Auto deploy | ✓ | ✓ | ✓ | N/A | N/A | N/A |
| Preview deploys | ✓ | ✓ | Custom | N/A | N/A | N/A |
| Custom domain | N/A | N/A | N/A | ✗ | ✓ | ✓ |
| SSL certificate | Auto | Auto | Auto | Auto | Auto | Manual |
| CDN | ✓ | ✓ | ✓ | ✓ | ✓ | Depends |
| Cost | Free | Free | Free | Free | Free | Varies |
Choosing the right setup
For startups and small teams
Recommended:- GitHub integration
- Mintlify subdomain initially
- Custom domain when ready
- Fastest setup
- Minimal configuration
- Easy to upgrade later
For enterprises
Recommended:- GitLab/GitHub integration
- Custom domain
- Subpath hosting (optional)
- Professional appearance
- Brand consistency
- Advanced security options
For monorepos
Recommended:- CI/CD deployment
- Custom domain
- Monorepo configuration
- Flexible deployment
- Works with existing setup
- Multiple docs in one repo
For agencies
Recommended:- GitHub integration
- Custom domains for each client
- Preview deployments
- Client branding
- Easy client handoff
- Professional workflow
Migration paths
From Mintlify subdomain to custom domain
- Add custom domain in dashboard
- Update DNS records
- Wait for SSL certificate
- Test custom domain
- Update links (optional)
From custom domain to subpath
- Set up reverse proxy/CDN
- Configure subpath routing
- Update DNS records
- Test subpath access
- Set up redirects
From one Git provider to another
- Push code to new repository
- Connect new repository in dashboard
- Disconnect old repository
- Update team access
Advanced configurations
Multiple environments
Deploy different branches to different domains:| Branch | Domain | Purpose |
|---|---|---|
main | docs.example.com | Production |
staging | staging-docs.example.com | Staging |
dev | dev-docs.example.com | Development |
Geographic distribution
Use CDN for global performance:- Automatic with Mintlify hosting
- Configure with custom CDN for subpath
- Edge caching for faster loads
Authentication
Add authentication to protect docs:| Method | Best For | Setup |
|---|---|---|
| Password | Simple protection | Dashboard config |
| JWT | Custom auth | API integration |
| OAuth | SSO integration | OAuth provider |
Performance considerations
Deployment speed
| Method | Typical Deploy Time |
|---|---|
| GitHub | 2-3 minutes |
| GitLab | 2-3 minutes |
| CI/CD | 3-5 minutes |
Build optimization
- Use preview deployments for testing
- Deploy only changed files
- Optimize images before committing
- Minimize custom scripts
Security best practices
For all deployments
- Use HTTPS (automatic with Mintlify)
- Keep API keys secret
- Rotate keys regularly
- Use environment variables
For custom domains
- Enable HSTS
- Configure CSP headers
- Use CAA DNS records
- Monitor SSL certificate expiration
For CI/CD
- Store API keys in secrets
- Limit API key permissions
- Use separate keys per environment
- Audit deployment logs
Troubleshooting
Deployment not triggering
GitHub/GitLab:- Check webhook configuration
- Verify branch name matches
- Review GitHub App permissions
- Verify API key is valid
- Check CI/CD logs
- Ensure correct project ID
Custom domain not working
- Verify DNS records
- Wait 24-48 hours for propagation
- Check SSL certificate status
- Clear browser cache
Slow deployments
- Optimize image sizes
- Reduce number of pages
- Check for large files
- Review custom scripts
Getting help
For deployment issues:- Check troubleshooting guide
- Review deployment documentation
- Contact support