Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sh committed Oct 14, 2023
2 parents 3c64193 + dfefc29 commit 8c4cc16
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Django CI/CD

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.12 # 사용할 Python 버전 선택

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test
- name: Deploy to AWS CodeDeploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_APPLICATION_NAME: autodeploy
AWS_DEPLOYMENT_GROUP: autoDeployGroup

run: |
aws deploy create-deployment \
--application-name $AWS_APPLICATION_NAME \
--deployment-group-name $AWS_DEPLOYMENT_GROUP \
--file-exists-behavior OVERWRITE \
--s3-location bucket=mutsa-s3-bucket,bundleType=zip,key=mutsa.zip \
--region ap-northeast-2
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ requests-oauthlib==1.3.1
sqlparse==0.4.4
typing_extensions==4.7.1
urllib3==2.0.4
django-cors-headers
mysqlclient
Pillow

0 comments on commit 8c4cc16

Please sign in to comment.