Why build it this way
Most portfolios tell you what someone can do. I wanted this one to show it. The panel at the top of the homepage isn’t decoration: the commit, the pipeline run, the checks and the uptime all come from files the pipeline writes during the deploy you’re looking at.
I also gave myself one hard rule: it has to cost nothing. Everything runs on GitHub Pages, GitHub Actions and GitHub Container Registry, which are free for a public repo.
The pipeline
One GitHub Actions workflow runs on every push, on every pull request, every three hours on a schedule, and on demand. Two jobs run in parallel, and the deploy only starts if both pass.
- git push
- Site checks
- Container checks
- Build with live data
- Deploy to Pages
Site checks
ruff lints the build script, html-validate checks every generated page, and lychee makes sure no internal link or anchor is broken.
Container checks
hadolint lints the Dockerfile, Trivy scans the repo for secrets and misconfigurations and the built image for critical vulnerabilities, then a smoke test starts the container and checks the page, the JSON data and the security headers.
Deploy
The site is rebuilt with live data: commit and run details, a snapshot of my GitHub repos, and the latest health check. Then it goes to GitHub Pages. On main, the container image is also pushed to GitHub Container Registry.
Uptime without a database
An uptime chart needs history, and history usually means a database or a paid monitoring service. Instead, the history lives on the site itself.
Every scheduled run downloads the current status.json from the live site, probes the homepage, appends the result, drops anything older than 30 days and deploys again. Nothing gets committed back to the repo, so the Git history stays clean.
One detail I like: a 404 before the site has ever answered is treated as “not launched yet” rather than downtime. Launch day shouldn’t count as an outage.
The container
GitHub Pages is where the site lives, but the same build also ships as a container, because that’s how most real services run. The image is based on an unprivileged nginx that runs as a non-root user on port 8080. The nginx config adds a Content Security Policy and other security headers, caches versioned assets for a year, never caches the live data files, and exposes /healthz for health checks.
Decisions I made and why
No framework
A portfolio doesn’t need React. Plain HTML, CSS and JavaScript load fast, have no dependencies to patch, and are easy for anyone to read.
Findings show up on the run
Lint and scan results are posted as annotations on the GitHub run, so a failure tells you the exact file, line or package to fix without digging through logs.
Keep dependencies fresh automatically
Dependabot watches the GitHub Actions and the Docker base image, so updates arrive as pull requests that go through the same checks.
Tight Content Security Policy
Scripts only load from the site itself, plus one cookie-free stats script from GoatCounter. The only other outside connection is the GitHub API for the project list.
Stack HTML, CSS, JavaScript, Python, GitHub Actions, Docker, nginx, Trivy, hadolint, html-validate, lychee, GitHub Pages, GitHub Container Registry