cat como-foi-feito.md
How it is built
Quick reference for this site's architecture, pipeline and decisions.
Parts
| Part | Role |
|---|---|
| Astro | Builds the static site from the Markdown in content/ |
| Cloudflare Pages | Hosts and serves from the CDN (free plan) |
| Cloudflare Web Analytics | Counts visits without cookies |
| Terraform | Creates the Pages project and Web Analytics |
| HCP Terraform | Stores the Terraform state |
| GitHub Actions | Validates every PR and deploys every push to main |
| Docker Compose | Local staging, localhost only |
Pipeline
- PR or push:
astro check,astro build, link check andterraform validate. - Push to
main: if no content is marked as pending, the build goes to production withwrangler pages deploy. - Staging:
docker compose upserves the production build onlocalhost. There is no public preview URL.
The infrastructure rarely changes. So terraform apply runs on my machine, and CI only checks that the code is still valid.
Decisions (ADRs, in Portuguese)
| ADR | Decision |
|---|---|
| 001 | Astro, with the text in Markdown in its own folder |
| 002 | Cloudflare on the free plan, with a written exit plan |
| 003 | Terraform with remote state and local apply |
| 004 | Deploy from GitHub Actions, not the Pages Git integration |
Stated limits
- No server and no database: the site stores nothing about visitors.
- Depends on Cloudflare; ADR 002 describes how to leave.
- Content in Portuguese and English.
Code
It’s all at github.com/osamufelix/portfolio-samu.