Skip to content

Commit 880cd2c

Browse files
committed
update: github action 스크립트 수정
1 parent b2b8725 commit 880cd2c

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

.github/workflows/deploy_on_dev.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ jobs:
7474
source ./zappa-env/bin/activate
7575
python manage.py test
7676
77-
# - name: Test with pytest
78-
# run: |
79-
# source ./zappa-env/bin/activate
80-
# pytest pyconweb2022
77+
- name: Test with pytest
78+
run: |
79+
source ./zappa-env/bin/activate
80+
pytest .
8181
8282
- name: Configure AWS Credentials
8383
uses: aws-actions/configure-aws-credentials@v1

.github/workflows/deploy.yml renamed to .github/workflows/deploy_on_prod.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.8]
11+
python-version: [3.9]
1212

1313
steps:
1414
- uses: actions/checkout@v2
@@ -40,17 +40,18 @@ jobs:
4040
4141
- name: Create Virtualenv
4242
run: |
43-
virtualenv pyconweb2022-zappa
43+
virtualenv zappa-env
4444
4545
# - name: Activate Virtualenv
4646
# run: |
4747
# source ./pyconweb2022-zappa/bin/activate
4848

4949
- name: Install dependencies
5050
run: |
51-
source ./pyconweb2022-zappa/bin/activate
51+
source ./zappa-env/bin/activate
5252
python -m pip install --upgrade pip
5353
pip install pytest
54+
pip install zappa
5455
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
5556
5657
# Pull request dose not get the gitub action secrets
@@ -63,26 +64,31 @@ jobs:
6364

6465
- name: update pyconkr-secretes
6566
run: |
67+
chmod 775 ./update_secrets.sh
6668
./update_secrets.sh
6769
70+
- name: Test with Django Test
71+
run: |
72+
source ./zappa-env/bin/activate
73+
python manage.py test
74+
6875
- name: Test with pytest
6976
run: |
70-
source ./pyconweb2022-zappa/bin/activate
71-
pytest pyconweb2022
77+
source ./zappa-env/bin/activate
78+
pytest .
7279
7380
- name: Configure AWS Credentials
7481
uses: aws-actions/configure-aws-credentials@v1
7582
with:
76-
aws-access-key-id: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
77-
aws-secret-access-key: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
83+
aws-access-key-id: ${{ secrets.PYCON_DEV_2023_AWS_SECRET }}
84+
aws-secret-access-key: ${{ secrets.PYCON_DEV_2023_AWS_SECRET }}
7885
aws-region: ap-northeast-2
7986

8087
- name: Zappa Deploy(Update)
8188
env:
82-
AWS_ACCESS_KEY_ID: ${{ secrets.PYCON_DEV_2021_AWS_KEY }}
83-
AWS_SECRET_ACCESS_KEY: ${{ secrets.PYCON_DEV_2021_AWS_SECRET }}
89+
AWS_ACCESS_KEY_ID: ${{ secrets.PYCON_DEV_2023_AWS_SECRET }}
90+
AWS_SECRET_ACCESS_KEY: ${{ secrets.PYCON_DEV_2023_AWS_SECRET }}
8491
run: |
85-
source ./pyconweb2022-zappa/bin/activate
86-
cd pyconweb2022
87-
zappa update production
92+
source ./zappa-env/bin/activate
93+
zappa update prod2023
8894
# zappa manage production collectstatic

0 commit comments

Comments
 (0)