Problem
A portfolio site is a small thing, but it’s also the first piece of my engineering a hiring manager can inspect. If it leaks data, tracks visitors, ships broken links or would publish something it shouldn’t, that says more than any project on it. I wanted it to meet the same bar I’d hold a production service to.
What I built
- Static site in Astro: plain Markdown content, no client-side framework, zero JavaScript except a theme toggle and a progressive-enhancement contact form.
- Typed content. Every project page has to declare its status, stack and dates. If a field is missing, the build fails.
- Hosting on Cloudflare Workers static assets, deployed by GitHub Actions on every merge to
main. - Security headers on every response: a strict Content-Security-Policy (
default-src 'none', scripts and styles from self only), HSTS,frame-ancestors 'none', a locked-down Permissions-Policy and Referrer-Policy. - A content-safety gate. Before deploying, a script scans the built site for terms that must never be published (internal tool names, clearance references, job-seeking language, phone numbers), plus broken internal links and missing page titles or descriptions. If anything matches, the deploy stops.
security.txtat/.well-known/security.txt, following RFC 9116.
How it works
# .github/workflows/ci.yml (abridged)
on: [push, pull_request]
jobs:
build:
steps:
- uses: actions/checkout@<pinned-sha>
- run: npm ci
- run: npm test # astro check → build → verify-dist (content + link gate)
deploy:
needs: build
if: github.ref == 'refs/heads/main'
steps:
- run: npx wrangler deploy # scoped API token from repo secrets
Results
- No cookies, no analytics, no third-party scripts.
- Pages ship with no framework runtime; most pages load one small stylesheet and a tiny script.
- Every deploy passes type checks, the content-safety gate and the internal link check.
What I’d do next
- Replace the third-party form service with my own Worker plus Cloudflare Turnstile, so form data never leaves my Cloudflare account.
- Add Lighthouse CI with a performance and accessibility budget.
- Add static search once there are enough write-ups to need it.