Deploy any static site with feature branch previews in minutes, not hours.
A comprehensive, production-ready CI/CD system for static sites that provides automated deployments, feature branch routing, SSL certificates, global CDN, and smart cleanup across AWS infrastructure.
curl -fsSL https://raw.githubusercontent.com/IX-Erich/ix-cicd/main/cli/deploy-setup.sh | bash -s init \
--project-name "my-awesome-app" \
--domain-name "myapp.example.com"
- name: Deploy Static Site
uses: IX-Erich/ix-cicd/reusable-actions/static-site-deploy@main
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
s3-bucket: 'myproject.example.com'
cloudfront-distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
spa-mode: 'true' # For React/Vue SPAs
module "my_static_site" {
source = "github.com/IX-Erich/ix-cicd//terraform/modules/static-site-hosting?ref=main"
project_name = "my-awesome-app"
domain_name = "myapp.example.com"
spa_mode = true # Enable for SPAs
}
- β
Feature Branch Deployments - Every branch gets its own URL (
/feature-name/
) - β Automated SSL/HTTPS - Free SSL certificates via AWS ACM
- β Global CDN - Fast loading worldwide via CloudFront
- β SEO Protection - Feature branches blocked from search engines
- β Auto-cleanup - Deployments removed when branches are deleted
- β Multi-framework Support - React, Vue, Jekyll, static HTML, Next.js
- β Production Ready - Security headers, performance optimization, cost controls
- Portfolio sites with live feature previews
- Side projects without server costs
- Client prototypes with shareable URLs
- Design reviews with live previews
- Stakeholder demos without technical setup
- QA testing in isolated environments
- Documentation sites with versioning
- Marketing pages with A/B testing
- Internal dashboards and tools
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β GitHub Repo β β GitHub Actions β β AWS Services β
β β β β β β
β Push to main ββββΌββββΊβ Build & Deploy βββΌββββΊβ S3 Bucket β
β β β β β CloudFront CDN β
β Push to feature/β β Feature Branch βββΌββββΊβ ACM Certificate β
β Push to hotfix/ β β Smart Router β β Route53 DNS β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
Results:
main
βhttps://yoursite.com/
feature/new-ui
βhttps://yoursite.com/feature-new-ui/
hotfix/urgent
βhttps://yoursite.com/hotfix-urgent/
Framework | Build Dir | SPA Mode | Example |
---|---|---|---|
React | build |
β Yes | examples/react-app/ |
Vue.js | dist |
β Yes | examples/vue-app/ |
Next.js | out |
β Yes | examples/nextjs-export/ |
Jekyll | _site |
β No | examples/jekyll-blog/ |
Static HTML | . |
β No | examples/static-html/ |
The comprehensive guide covering all features, setup options, and advanced configurations.
π οΈ Framework Examples
Real-world examples with step-by-step setup instructions for popular frameworks.
- CLI Tool - One-command project bootstrapping
- GitHub Actions - Reusable workflow components
- Terraform Module - Infrastructure as code
Every pushed branch gets its own deployment URL:
- Smart CloudFront Function routing
- SEO protection with
robots.txt
on preview branches - Automatic cleanup when branches are deleted
- Support for SPA routing on all deployments
- Automated SSL certificates via AWS Certificate Manager
- Custom domains with DNS validation
- Security headers: HSTS, CSP, X-Frame-Options, etc.
- HTTPS redirects for all traffic
- Global CDN with edge locations worldwide
- Intelligent caching with framework-specific rules
- Compression for all text-based assets
- HTTP/2 and modern protocol support
- Optimized cache policies to minimize origin requests
- Regional pricing tiers to control CloudFront costs
- Lifecycle policies for S3 storage optimization
- Resource tagging for cost allocation
Approach | Setup Time | Flexibility | Maintenance | Best For |
---|---|---|---|---|
CLI Tool | 1 minute | Medium | Low | Quick starts |
GitHub Actions | 5 minutes | High | Medium | Team consistency |
Terraform | 15 minutes | Very High | High | Infrastructure control |
Manual Setup | 30+ minutes | Maximum | High | Custom requirements |
jobs:
deploy-staging:
if: github.ref == 'refs/heads/develop'
# Deploy to staging.myapp.com
deploy-production:
if: github.ref == 'refs/heads/main'
# Deploy to myapp.com
module "my_static_site" {
# Basic config...
custom_cache_behaviors = [
{
path_pattern = "/api/*"
ttl_settings = { default_ttl = 0 } # Don't cache APIs
},
{
path_pattern = "*.js"
ttl_settings = { default_ttl = 31536000 } # Cache JS for 1 year
}
]
}
security_headers = {
"Strict-Transport-Security" = "max-age=63072000"
"Content-Security-Policy" = "default-src 'self'"
"X-Frame-Options" = "DENY"
}
- Copy your build settings to GitHub Actions workflow
- Update domain DNS to point to CloudFront
- Migrate environment variables to GitHub Secrets
- Export static build using
next export
or similar - Configure build directory in deployment action
- Update DNS records
- Keep existing S3 bucket or create new one
- Add CloudFront distribution for better caching
- Migrate build settings to GitHub Actions
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork this repository
- Create a feature branch:
git checkout -b feature/my-improvement
- Test your changes on a real project
- Submit a pull request with clear description
- Bug reports: Include steps to reproduce, expected vs actual behavior
- Feature requests: Describe the use case and proposed solution
- Questions: Check existing documentation and examples first
- Vue.js complete example
- Jekyll complete example
- GitHub CLI integration
- Cost estimation calculator
- Multi-region deployments
- Blue/green deployment support
- Integration with monitoring tools
- Custom domain automation
- Backup and disaster recovery
Please report security vulnerabilities to security@imaginariax.com. Do not use public issue trackers for security reports.
- IAM least privilege - Minimal AWS permissions
- Encrypted in transit - HTTPS everywhere
- Security headers - Protection against common attacks
- Secret management - Secure handling of credentials
MIT License - see LICENSE file for details.
- π Read the documentation - Comprehensive guides
- π Check examples - Framework-specific implementations
- π Search issues - Known problems and solutions
- β Create an issue - For bugs or feature requests
- Discord: Join our community for real-time help
- Twitter: @ix_cicd for updates and tips
- Blog: Technical deep-dives and tutorials
Choose your preferred approach and get started in minutes!
- π One-Command CLI Setup - Fastest way to get started
- π§ GitHub Actions Integration - Team-friendly workflows
- ποΈ Terraform Infrastructure - Full control
- π Complete Documentation - Everything you need to know
Deploy with confidence. Deploy with IX CI/CD. β‘