Skip to content

Django 기본기능을 사용해 collectstatic 수행 #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/deploy_on_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@ jobs:
run: |
source ./zappa-env/bin/activate
zappa update dev2023
zappa manage dev2023 "collectstatic --no-input"
# zappa manage dev2023 "collectstatic --no-input"

- name: Collect Static Files to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PYCON_DEV_2023_AWS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PYCON_DEV_2023_AWS_SECRET }}
AWS_S3_ACCESS_KEY_ID: ${{ secrets.PYCON_DEV_2023_AWS_KEY }}
AWS_S3_SECRET_ACCESS_KEY: ${{ secrets.PYCON_DEV_2023_AWS_SECRET }}
run: |
python manage.py collectstatic --no-input --settings=pyconkr.settings-dev
1 change: 1 addition & 0 deletions pyconkr/settings-dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
STATICFILES_STORAGE = "storages.backends.s3boto3.S3StaticStorage"
AWS_S3_ACCESS_KEY_ID = os.getenv("AWS_S3_ACCESS_KEY_ID")
AWS_S3_SECRET_ACCESS_KEY = os.getenv("AWS_S3_SECRET_ACCESS_KEY")
AWS_DEFAULT_REGION = "ap-northeast-2"
AWS_STORAGE_BUCKET_NAME = "pyconkr-api-v2-static-dev"
1 change: 1 addition & 0 deletions pyconkr/settings-prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
STATICFILES_STORAGE = "storages.backends.s3boto3.S3StaticStorage"
AWS_S3_ACCESS_KEY_ID = os.getenv("AWS_S3_ACCESS_KEY_ID")
AWS_S3_SECRET_ACCESS_KEY = os.getenv("AWS_S3_SECRET_ACCESS_KEY")
AWS_DEFAULT_REGION = "ap-northeast-2"
AWS_STORAGE_BUCKET_NAME = "pyconkr-api-v2-static"