Skip to content

Commit 3e4ea87

Browse files
authored
Merge pull request #263 from CSE-Shaco/develop
Chore(ci): sync s3 with delete in deploy workflow
2 parents 52b7077 + 940b6d6 commit 3e4ea87

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ jobs:
6060

6161
# (선택) 캐시 헤더 전략: 해시된 자산은 장기 캐시, HTML은 no-cache
6262
# 프로젝트에 맞게 include/exclude 패턴 조정
63-
- name: Upload static assets (long cache)
63+
- name: Sync static assets (long cache, delete removed)
6464
run: |
65-
aws s3 cp ./out s3://$TARGET_BUCKET \
66-
--recursive \
65+
aws s3 sync ./out s3://$TARGET_BUCKET \
66+
--delete \
6767
--exclude "*" \
6868
--include "_next/**" --include "static/**" --include "assets/**" \
6969
--cache-control "public, max-age=31536000, immutable" \
7070
--metadata-directive REPLACE
71-
- name: Upload html (no cache)
71+
- name: Sync html (no cache, delete removed)
7272
run: |
73-
aws s3 cp ./out s3://$TARGET_BUCKET \
74-
--recursive \
75-
--exclude "_next/*" --exclude "static/*" --exclude "assets/*" \
73+
aws s3 sync ./out s3://$TARGET_BUCKET \
74+
--delete \
75+
--exclude "_next/**" --exclude "static/**" --exclude "assets/**" \
7676
--cache-control "no-cache" \
7777
--metadata-directive REPLACE
7878
# (단순화 원하면 기존 sync 한 줄 유지 가능)

0 commit comments

Comments
 (0)