From 44aac4136969a5a291cf87f1e842fbd574f8d5ba Mon Sep 17 00:00:00 2001 From: Shinya <13072231+myConsciousness@users.noreply.github.com> Date: Sun, 8 Mar 2026 11:16:41 +0900 Subject: [PATCH] chore: Add AWS CodeBuild configuration for website deployment - Add buildspec.yaml for automated CI/CD pipeline - Configure Node.js 24 runtime and npm dependencies installation - Define build phase to compile website assets - Add post-build commands to sync artifacts to S3 and invalidate CloudFront distribution - Configure build artifact output and node_modules caching for faster builds --- website/buildspec.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 website/buildspec.yaml diff --git a/website/buildspec.yaml b/website/buildspec.yaml new file mode 100644 index 000000000..a2a96470a --- /dev/null +++ b/website/buildspec.yaml @@ -0,0 +1,26 @@ +version: 0.2 + +phases: + install: + runtime-versions: + nodejs: 24 + commands: + - npm install + + build: + commands: + - npm run build + + post_build: + commands: + - aws s3 sync ./build s3://$S3_ORIGIN_BUCKET/ --delete + - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID --paths "/*" + +artifacts: + files: + - 'build/**/*' + name: BuildArtifact + +cache: + paths: + - 'node_modules/**/*' \ No newline at end of file -- 2.51.2