Static sites are deployed using the static-website module — S3 for storage, CloudFront for global CDN, and automatic HTTPS via ACM certificates.
Prerequisites
- SharedServices account with an artifact bucket provisioned
- Workload account linked and validated
- DNS configured (service discovery zone + certificate)
- A GitHub repository with your static site code and a build script
Step 1: Create the Application
- Deployment Type: S3 Artifact
- Tech Stack: Hugo, Vite, Next.js, Gatsby, etc.
- Build Script: Path to your build script (e.g.,
scripts/build.sh) - Build Output Directory: Where build artifacts land (default:
dist)
Step 2: Scaffold the Application Repository
Scaffolding creates a build.yml workflow that:
- Runs your build script (or
npm ci && npm run build) - Packages the output as a zip
- Uploads to the SharedServices artifact bucket
- Notifies Opsitron of the new artifact
Step 3: Deploy Infrastructure
Create a Module Deploy request for your app and environment. The AI agent deploys the static-website module which creates:
- S3 bucket for website content
- CloudFront distribution with custom domain
- Origin Access Control for secure S3 access
- DNS A record pointing to CloudFront
- SSM parameters for deploy workflow discovery
Step 4: Push Code
Push to main. The build workflow uploads your artifact. Opsitron auto-deploys:
- Downloads the artifact zip from SharedServices
- Syncs to the website S3 bucket (immutable assets get long cache, HTML/JSON get no-cache)
- Invalidates CloudFront
- Waits for invalidation to complete
Your site is live with HTTPS, global CDN, and automatic cache invalidation on every deploy.
Cost
A static site on Opsitron costs very little:
| Resource | Monthly Cost |
|---|---|
| S3 Standard | ~$0.023/GB |
| CloudFront (PriceClass_100) | ~$0 + $0.085/GB transfer |
| ACM Certificate | Free |
| Route53 Zone | $0.50/zone |
| Typical dev site | < $1/month |