Skip to content

Add deploy-frontend target to Makefile#1529

Merged
kenkoooo merged 1 commit into
mainfrom
feat/makefile-deploy-frontend
Jun 13, 2026
Merged

Add deploy-frontend target to Makefile#1529
kenkoooo merged 1 commit into
mainfrom
feat/makefile-deploy-frontend

Conversation

@kenkoooo

Copy link
Copy Markdown
Owner

概要

フロントエンドをローカルでビルドし、サイトを配信している S3 バケットへ sync する deploy-frontend サブコマンドを Makefile に追加しました。

使い方

make deploy-frontend

デフォルトの sync 先は s3://kenkoooo.com/ です。S3_BUCKET 変数で上書きできます。

make deploy-frontend S3_BUCKET=my-bucket

実装メモ

  • atcoder-problems-frontendpnpm install --frozen-lockfile && pnpm run build を実行してから、build/aws s3 sync します。
  • aws s3 sync--delete は意図的に付けていません。配信バケットのルートにはフロントエンドのビルド成果物だけでなく、バックエンドが生成する API データ(resources/ 配下の ac.json / contests.json 等)も同居しているため、--delete を付けるとそれらを削除してしまうためです。
  • pnpm run buildreact-scripts build に加えて mdbook による md:buildguide/ のドキュメント生成)も実行するため、ローカルに mdbook が必要です。

動作確認

  • make -n deploy-frontend でレシピが期待通り展開されることを確認しました(実際のデプロイは未実行)。

🤖 Generated with Claude Code

Build the frontend locally and sync the build artifacts to the S3 bucket
that serves the site. The bucket is configurable via the S3_BUCKET variable
(defaults to kenkoooo.com).

--delete is intentionally omitted from the sync because the destination
bucket also hosts backend-generated data (e.g. resources/) that is not part
of the frontend build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kenkoooo kenkoooo merged commit d801e01 into main Jun 13, 2026
2 checks passed
@kenkoooo kenkoooo deleted the feat/makefile-deploy-frontend branch June 13, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant