Richard Shen

souloist.dev

Personal site for Richard Z. Shen, built with Hugo and deployed to Cloudflare Workers.

Architecture

Local development

hugo server -D

Setup

First-time setup creates a .env file for local credentials:

./scripts/setup

Fill in the values, then you can run wrangler deploy or terraform commands locally.

Infrastructure

Terraform state is stored in a Cloudflare R2 bucket (souloist-tf-state). To work with infrastructure:

cd terraform
export $(grep -v '^#' ../.env | xargs)
TF_VAR_cloudflare_api_token="$CLOUDFLARE_API_TOKEN" terraform plan

Deployment

Pushes to master trigger GitHub Actions which runs hugo --minify and wrangler deploy. Secrets are stored in GitHub Actions repo settings.