diff --git a/Makefile b/Makefile index 33b6dcc1..00063a86 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build build-backend build-estimator build-dbt +.PHONY: build build-backend build-estimator build-dbt deploy-frontend build: build-backend build-estimator build-dbt @@ -10,3 +10,13 @@ build-estimator: build-dbt: docker build -t atcoder-problems-2025-dbt:latest ./dbt + +FRONTEND_DIR := atcoder-problems-frontend +S3_BUCKET ?= kenkoooo.com + +# Build the frontend locally and sync the artifacts to S3. +# Note: --delete is intentionally NOT used because the destination bucket also +# hosts backend-generated data (e.g. resources/) that is not part of the build. +deploy-frontend: + cd $(FRONTEND_DIR) && pnpm install --frozen-lockfile && pnpm run build + aws s3 sync $(FRONTEND_DIR)/build/ s3://$(S3_BUCKET)/