Skip to content

About

Astro frontend and AWS infrastructure for chrispsheehan.com.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

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.
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.

  • Infra Bootstrap is the first-time environment bring-up path for dev and prod. It applies aws/code_bucket first so the shared bootstrap Lambda zip exists before the Lambda stacks are created.
  • Infra Plan writes saved Terragrunt plans for the selected environment.
  • Infra Apply From Plan reuses a prior plan run and applies only modules whose saved plan JSON reported changes.
  • Dev Code Deploy builds frontend.zip and log_processor.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 the Lambda through CodeDeploy, and invokes it once in a separate CI job.

Production deploys target chrispsheehan.com.

  • A new GitHub release publishes versioned frontend and log_processor artifacts but does not deploy them to production.
  • Manually dispatch Prod Code Deploy with a release tag after any required infrastructure rollout. Production validates those artifacts and then rolls them out; the same workflow supports redeployments and rollbacks.

Further Reading

About

Astro frontend and AWS infrastructure for chrispsheehan.com.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages