Skip to content

Commit 15e67da

Browse files
committed
Merge remote-tracking branch 'upstream/devdev' into feature/sponsors
2 parents c0817a5 + a6bfaee commit 15e67da

File tree

153 files changed

+15540
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+15540
-175
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Your checklist for this pull request
2+
3+
> ⚠️ [파이콘 한국 Contributing Guide](./CONTRIBUTING.md)를 꼭 준수해주세요.
4+
5+
- PR의 **compare branch를 main나 dev로 생성하지 않아야** 합니다. :smile:
6+
- PR의 **base branch는 dev으로 지정**해야 합니다.
7+
- Commit message가 적절한지 확인해주세요.
8+
9+
## Description
10+
11+
PR에 관한 설명을 상세히 적어주세요.
12+
13+
Thank you ❤️

.github/workflows/deploy.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Deploy Django with zappa on PRODUCTION stage
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: psf/black@stable
19+
with:
20+
options: "--check --verbose"
21+
src: "./pyconweb2022"
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install mysql common
29+
run: |
30+
sudo apt-get install -y mysql-common
31+
32+
# - name: Install python version
33+
# uses: gabrielfalcao/pyenv-action@v9
34+
# with:
35+
# default: "${{ matrix.python }}"
36+
# command: |
37+
# python -m pip install --upgrade pip
38+
# pip install pytest
39+
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
40+
41+
- name: Setup Virtualenv
42+
run: |
43+
pip install virtualenv
44+
45+
- name: Create Virtualenv
46+
run: |
47+
virtualenv pyconweb2022-zappa
48+
49+
# - name: Activate Virtualenv
50+
# run: |
51+
# source ./pyconweb2022-zappa/bin/activate
52+
53+
- name: Install dependencies
54+
run: |
55+
source ./pyconweb2022-zappa/bin/activate
56+
python -m pip install --upgrade pip
57+
pip install pytest
58+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
59+
60+
# Pull request dose not get the gitub action secrets
61+
# this section will be applied to the deploy workflow
62+
- name: Setup Auth for Private Repo
63+
uses: webfactory/[email protected]
64+
with:
65+
ssh-private-key: ${{ secrets.SSH_SECRET_GOLONY }}
66+
# ssh-private-key: ${{ secrets.GH_PYCONKR_SECRETS }}
67+
68+
- name: update pyconkr-secretes
69+
run: |
70+
./update_secrets.sh
71+
72+
- name: Test with pytest
73+
run: |
74+
source ./pyconweb2022-zappa/bin/activate
75+
pytest pyconweb2022
76+
77+
- name: Configure AWS Credentials
78+
uses: aws-actions/configure-aws-credentials@v1
79+
with:
80+
aws-access-key-id: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
81+
aws-secret-access-key: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
82+
aws-region: ap-northeast-2
83+
84+
- name: Zappa Deploy(Update)
85+
env:
86+
AWS_ACCESS_KEY_ID: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
87+
AWS_SECRET_ACCESS_KEY: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
88+
run: |
89+
source ./pyconweb2022-zappa/bin/activate
90+
cd pyconweb2022
91+
zappa update production
92+
# zappa manage production collectstatic
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Deploy Django with zappa on DEV stage
2+
3+
on:
4+
push:
5+
branches: [devdev]
6+
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: psf/black@stable
19+
with:
20+
options: "--check --verbose"
21+
src: "./pyconweb2022"
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install mysql common
29+
run: |
30+
sudo apt-get install -y mysql-common
31+
32+
# - name: Install python version
33+
# uses: gabrielfalcao/pyenv-action@v9
34+
# with:
35+
# default: "${{ matrix.python }}"
36+
# command: |
37+
# python -m pip install --upgrade pip
38+
# pip install pytest
39+
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
40+
41+
- name: Setup Virtualenv
42+
run: |
43+
pip install virtualenv
44+
45+
- name: Create Virtualenv
46+
run: |
47+
virtualenv pyconweb2022-zappa
48+
49+
# - name: Activate Virtualenv
50+
# run: |
51+
# source ./pyconweb2022-zappa/bin/activate
52+
53+
- name: Install dependencies
54+
run: |
55+
source ./pyconweb2022-zappa/bin/activate
56+
python -m pip install --upgrade pip
57+
pip install pytest
58+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
59+
60+
# Pull request dose not get the gitub action secrets
61+
# this section will be applied to the deploy workflow
62+
- name: Setup Auth for Private Repo
63+
uses: webfactory/[email protected]
64+
with:
65+
ssh-private-key: ${{ secrets.SSH_SECRET_GOLONY }}
66+
# ssh-private-key: ${{ secrets.GH_PYCONKR_SECRETS }}
67+
68+
- name: update pyconkr-secretes
69+
run: |
70+
./update_secrets.sh
71+
72+
- name: Test with pytest
73+
run: |
74+
source ./pyconweb2022-zappa/bin/activate
75+
pytest pyconweb2022
76+
77+
- name: Configure AWS Credentials
78+
uses: aws-actions/configure-aws-credentials@v1
79+
with:
80+
aws-access-key-id: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
81+
aws-secret-access-key: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
82+
aws-region: ap-northeast-2
83+
84+
- name: Zappa Deploy(Update)
85+
env:
86+
AWS_ACCESS_KEY_ID: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
87+
AWS_SECRET_ACCESS_KEY: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
88+
run: |
89+
source ./pyconweb2022-zappa/bin/activate
90+
cd pyconweb2022
91+
zappa update dev
92+
# zappa manage dev collectstatic

.github/workflows/front_deploy.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This workflow will build and push a new container image to Amazon ECR,
2+
# and then will deploy a new task definition to Amazon ECS, when a release is created
3+
#
4+
# To use this workflow, you will need to complete the following set-up steps:
5+
#
6+
# 1. Create an ECR repository to store your images.
7+
# For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`.
8+
# Replace the value of `ECR_REPOSITORY` in the workflow below with your repository's name.
9+
# Replace the value of `aws-region` in the workflow below with your repository's region.
10+
#
11+
# 2. Create an ECS task definition, an ECS cluster, and an ECS service.
12+
# For example, follow the Getting Started guide on the ECS console:
13+
# https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/firstRun
14+
# Replace the values for `service` and `cluster` in the workflow below with your service and cluster names.
15+
#
16+
# 3. Store your ECS task definition as a JSON file in your repository.
17+
# The format should follow the output of `aws ecs register-task-definition --generate-cli-skeleton`.
18+
# Replace the value of `task-definition` in the workflow below with your JSON file's name.
19+
# Replace the value of `container-name` in the workflow below with the name of the container
20+
# in the `containerDefinitions` section of the task definition.
21+
#
22+
# 4. Store an IAM user access key in GitHub Actions secrets named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
23+
# See the documentation for each action used below for the recommended IAM policies for this IAM user,
24+
# and best practices on handling the access key credentials.
25+
26+
name: Deploy Next.js App on PRODUCTION stage
27+
28+
on:
29+
push:
30+
branches: [main]
31+
32+
33+
jobs:
34+
build:
35+
36+
runs-on: ubuntu-latest
37+
defaults:
38+
run:
39+
working-directory: ./frontend
40+
41+
steps:
42+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
43+
- uses: actions/checkout@v2
44+
45+
- uses: actions/setup-node@v1
46+
with:
47+
node-version: 14
48+
49+
- run: npm install -g yarn
50+
51+
- run: yarn install
52+
53+
- run: yarn add [email protected]
54+
55+
- run: npm install -g env-cmd
56+
57+
- uses: aws-actions/configure-aws-credentials@v1
58+
with:
59+
aws-access-key-id: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
60+
aws-secret-access-key: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
61+
aws-region: ap-northeast-2
62+
- run: env-cmd -e prod npx serverless
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This workflow will build and push a new container image to Amazon ECR,
2+
# and then will deploy a new task definition to Amazon ECS, when a release is created
3+
#
4+
# To use this workflow, you will need to complete the following set-up steps:
5+
#
6+
# 1. Create an ECR repository to store your images.
7+
# For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`.
8+
# Replace the value of `ECR_REPOSITORY` in the workflow below with your repository's name.
9+
# Replace the value of `aws-region` in the workflow below with your repository's region.
10+
#
11+
# 2. Create an ECS task definition, an ECS cluster, and an ECS service.
12+
# For example, follow the Getting Started guide on the ECS console:
13+
# https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/firstRun
14+
# Replace the values for `service` and `cluster` in the workflow below with your service and cluster names.
15+
#
16+
# 3. Store your ECS task definition as a JSON file in your repository.
17+
# The format should follow the output of `aws ecs register-task-definition --generate-cli-skeleton`.
18+
# Replace the value of `task-definition` in the workflow below with your JSON file's name.
19+
# Replace the value of `container-name` in the workflow below with the name of the container
20+
# in the `containerDefinitions` section of the task definition.
21+
#
22+
# 4. Store an IAM user access key in GitHub Actions secrets named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
23+
# See the documentation for each action used below for the recommended IAM policies for this IAM user,
24+
# and best practices on handling the access key credentials.
25+
26+
name: Deploy Next.js App on DEV stage
27+
28+
on:
29+
push:
30+
branches: [devdev]
31+
32+
33+
jobs:
34+
build:
35+
36+
runs-on: ubuntu-latest
37+
defaults:
38+
run:
39+
working-directory: ./frontend
40+
41+
steps:
42+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
43+
- uses: actions/checkout@v2
44+
45+
- uses: actions/setup-node@v1
46+
with:
47+
node-version: 14
48+
49+
- run: npm install -g yarn
50+
51+
- run: yarn install
52+
53+
- run: npm install [email protected]
54+
55+
- run: npm install -g env-cmd
56+
57+
- uses: aws-actions/configure-aws-credentials@v1
58+
with:
59+
aws-access-key-id: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
60+
aws-secret-access-key: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
61+
aws-region: ap-northeast-2
62+
- run: env-cmd -e dev npx serverless

.github/workflows/run_test.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: Testing pyconweb2022
22

33
on:
4-
push:
5-
branches: [main]
64
pull_request:
7-
branches: [main]
5+
branches: [devdev]
86

97

108
jobs:
@@ -17,18 +15,45 @@ jobs:
1715

1816
steps:
1917
- uses: actions/checkout@v2
18+
- uses: psf/black@stable
19+
with:
20+
options: "--check --verbose"
21+
src: "./pyconweb2022"
22+
2023
- name: Set up Python ${{ matrix.python-version }}
2124
uses: actions/setup-python@v2
2225
with:
2326
python-version: ${{ matrix.python-version }}
27+
2428
- name: Install mysql common
2529
run: |
2630
sudo apt-get install -y mysql-common
31+
32+
# - name: Install python version
33+
# uses: gabrielfalcao/pyenv-action@v9
34+
# with:
35+
# default: "${{ matrix.python }}"
36+
# command: |
37+
# python -m pip install --upgrade pip
38+
# pip install pytest
39+
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
40+
41+
- name: Setup Virtualenv
42+
run: |
43+
pip install virtualenv
44+
45+
- name: Create Virtualenv
46+
run: |
47+
virtualenv pyconweb2022-zappa
48+
2749
- name: Install dependencies
2850
run: |
51+
source ./pyconweb2022-zappa/bin/activate
2952
python -m pip install --upgrade pip
3053
pip install pytest
3154
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
55+
3256
- name: Test with pytest
3357
run: |
34-
pytest pyconweb2022
58+
source ./pyconweb2022-zappa/bin/activate
59+
pytest pyconweb2022

0 commit comments

Comments
 (0)