Skip to content

Commit

Permalink
Project Initialize (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwanok authored Mar 25, 2024
1 parent fe05a4e commit 9335243
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 42 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/elastic-beanstalk-deploy-prod

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/elastic-beanstalk-deploy-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Deploy to AWS Elastic Beanstalk Dev

on:
push:
branches:
- main


jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.12 ]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Black
run: black --check web/project

- name: Run Ruff
run: ruff check web/project
deploy:
runs-on: ubuntu-latest

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

- name: Copy Elastic Beanstalk Config
run: |
mkdir -p .elasticbeanstalk
echo "${{ secrets.EB_CONFIG }}" > .elasticbeanstalk/config.yml
- name: Generate Deployment Package
run: |
mkdir -p deploy
zip -r deploy/deploy.zip .
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"

- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v22
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: duofinder
environment_name: ${{ secrets.ENVIRONMENT_NAME }}
version_label: github-action-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: deploy/deploy.zip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## Development Guide

```bash
git clone https://github.com/boostcampaitech6/level2-3-recsys-finalproject-recsys-05.git duofinder
git clone https://github.com/duofinderkr/web.git duofinder
cd duofinder/web
```

Expand Down
31 changes: 29 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions project/project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"allauth.account",
"allauth.socialaccount",
"allauth.socialaccount.providers.discord",
"ebhealthcheck.apps.EBHealthCheckConfig",
]

SITE_ID = 1
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["nohkwanok <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
python = ">=3.11, <3.13"
django = "^5.0.2"
jinja2 = "^3.1.3"
black = "^24.2.0"
Expand All @@ -26,6 +26,7 @@ psycopg-binary = "^3.1.18"
boto3 = "^1.34.69"
python-dotenv = "^1.0.1"
django-storages = "^1.14.2"
django-ebhealthcheck = "^2.0.2"


[build-system]
Expand Down

0 comments on commit 9335243

Please sign in to comment.