The source for my personal site mtgibbs.xyz. It is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run devOpen http://localhost:3000 with your browser.
This project uses GitHub Actions for automated CI/CD.
Pushes to the mater branch trigger the following in parallel:
- Build: A Docker image is built for the Next.js application.
- Push: The image is pushed to the Heroku Container Registry.
- Release: The container is released to the Heroku app (
mtgibbs). - Purge: The Cloudflare cache is automatically purged.
- Multi-Arch Build: Builds images for both
linux/amd64andlinux/arm64(Raspberry Pi support). - Tagging: Images are tagged with
latest, git SHA, and a timestamp (YYYYMMDDHHmmss) for Flux numeric sorting. - Push: Images are pushed to GitHub Container Registry.
The following GitHub Secrets must be configured for the Heroku workflow:
HEROKU_API_KEY: Your Heroku API key.HEROKU_APP_NAME:mtgibbsHEROKU_EMAIL: Your Heroku account email.CLOUDFLARE_ZONE: The Zone ID for mtgibbs.xyz.CLOUDFLARE_TOKEN: A Cloudflare API Token with "Purge Cache" permissions.
Note: GITHUB_TOKEN is used automatically for GHCR publishing.
If you ever need to manually deploy via Docker:
$> docker build -t registry.heroku.com/mtgibbs/web .
$> docker push registry.heroku.com/mtgibbs/web
$> heroku container:release web --app mtgibbs