Skip to content

Commit 3a91ff2

Browse files
authored
Merge pull request #3 from pythonkr/feature/fix-cd
잘못된 버킷을 사용하려 하는 이슈 수정 & 배포 중 마이그레이션도 진행하도록 추가
2 parents 23277ef + 99e6001 commit 3a91ff2

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,17 @@ jobs:
115115
- name: Zappa Update
116116
run: uv run zappa update ${{ env.API_STAGE }} --docker-image-uri ${{ env.AWS_ECR_REGISTRY }}:${{ steps.info.outputs.TAG }}
117117

118+
- name: Django collect staticfiles
119+
run: uv run zappa manage ${{ env.API_STAGE }} "collectstatic --no-input"
120+
121+
# Django migrate
122+
- name: Django migrate
123+
run: uv run zappa manage ${{ env.API_STAGE }} "migrate --noinput"
124+
118125
# Zappa certify
119126
- name: Zappa Certify
120127
run: uv run zappa certify ${{ env.API_STAGE }} --yes
121128

122-
- name: Collect staticfiles
123-
run: uv run zappa manage ${{ env.API_STAGE }} "collectstatic --no-input"
124-
125129
# Notify to Slack (Success)
126130
- name: Notify deployment to Slack
127131
if: failure() || cancelled()

app/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
DEFAULT_STORAGE_BACKEND = env("DJANGO_DEFAULT_STORAGE_BACKEND", default="storages.backends.s3.S3Storage")
275275
STATIC_STORAGE_BACKEND = env("DJANGO_STATIC_STORAGE_BACKEND", default="storages.backends.s3.S3Storage")
276276

277-
STORAGE_BUCKET_NAME = f"pyconkr-backend-api-{API_STAGE}"
277+
STORAGE_BUCKET_NAME = f"pyconkr-backend-{API_STAGE}"
278278
STORAGE_OPTIONS = (
279279
{
280280
"bucket_name": STORAGE_BUCKET_NAME,

0 commit comments

Comments
 (0)