Skip to content

chrispsheehan/chrispsheehan.com

Repository files navigation

chrispsheehan.com

Release Infra Plan Infra Apply Code Deploy

CloudFront-backed static frontend for chrispsheehan.com, scaffolded from the aws-terragrunt-starter golden path.

This repo contains the site frontend, its small supporting Lambda set, and the AWS infrastructure used to build and deploy both.

Start Here

If you just need to get oriented:

  1. Read the repo layout below.
  2. Run just --list to see the available local workflows.
  3. Use just start for local frontend work.
  4. Use just tg dev aws/frontend plan when you need to inspect the dev stack.

Repo Layout

Path Purpose
frontend/ Astro static site with React components. Build output goes to frontend/dist.
lambdas/ Lambda source, packaging contract, and runtime notes for log_processor and cost_explorer.
infra/ Terragrunt live stacks and Terraform modules for frontend, data, security, published OIDC role wiring, and artifact storage.

Common Commands

The commands most people reach for first are:

just --list
just start
just unit-test
just log-processor-run
just frontend-deploy-live dev
just tg dev aws/frontend plan
just tg-all dev plan
AWS_REGION=eu-west-2 LAMBDA_NAME=prod-chrispsheehan-com-log-processor just --justfile scripts/deploy/justfile lambda-invoke

Setup

The AWS account must already contain:

  • the GitHub OIDC provider for https://token.actions.githubusercontent.com
  • the public Route53 hosted zone chrispsheehan.com
  • an S3 backend bucket named from infra/root.hcl: <AWS_ACCOUNT_ID>-<AWS_REGION>-chrispsheehan-com-tfstate

Bootstrap GitHub Actions roles once from a local shell with AWS credentials that can manage IAM:

export AWS_PROFILE=default
export AWS_REGION=eu-west-2

just tg ci aws/oidc apply
just tg dev aws/oidc apply
just tg prod aws/oidc apply

Set these GitHub repository variables under Settings -> Secrets and variables -> Actions -> Variables:

AWS_ACCOUNT_ID=<your AWS account id>
AWS_REGION=eu-west-2
PROJECT_NAME=chrispsheehan.com

Workflows assume roles named:

<PROJECT_NAME>-<ENVIRONMENT>-github-oidc-role

Deploys

Development deploys target dev.chrispsheehan.com and build from the current commit.

  • Dev Infra Plan and Dev Infra Apply No Plan create or update the AWS infrastructure.
  • Dev Code Deploy builds frontend.zip, log_processor.zip, and cost_explorer.zip, uploads them to the dev code bucket, syncs the frontend artifact to the S3 origin bucket, refreshes CloudFront in a separate CI job, rolls both Lambdas through CodeDeploy, and invokes each Lambda once in a separate CI job.

Production deploys target chrispsheehan.com.

  • Production rolls a selected frontend artifact and the selected log_processor and cost_explorer Lambda artifacts.

Further Reading

About

Astro frontend and AWS infrastructure for chrispsheehan.com.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors