Skip to content

Commit b3eec26

Browse files
authored
Merge pull request #156 from pythonkr/fix/deployment-workflow-secrets-error
Fix: zappa_settings.json 가져오는 방식 변경
2 parents 759a5ab + 13f6426 commit b3eec26

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

.github/workflows/deploy_on_dev.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ jobs:
5757
pip install zappa
5858
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
5959
60-
# Pull request dose not get the gitub action secrets
61-
# this section will be applied to the deploy workflows
62-
- name: Setup Auth for Private Repo
63-
uses: webfactory/[email protected]
60+
# Checkout and import zappa config
61+
- name: Checkout secrets repo
62+
uses: actions/checkout@v4
6463
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-
chmod 775 ./update_secrets.sh
71-
./update_secrets.sh
64+
repository: ${{ secrets.PYCONKR_SECRET_REPOSITORY }}
65+
ssh-key: ${{ secrets.PYCONKR_SECRET_REPOSITORY_DEPLOY_KEY }}
66+
path: secret_envs
67+
clean: false
68+
sparse-checkout-cone-mode: false
69+
sparse-checkout: |
70+
${{ steps.info.outputs.repository_name }}/zappa_settings.json
71+
- run: mv secret_envs/${{ steps.info.outputs.repository_name }}/zappa_settings.json ./zappa_settings.json && rm -rf secret_envs
7272

7373
# - name: Test with Django Test
7474
# run: |

.github/workflows/deploy_on_prod.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ jobs:
5757
pip install zappa
5858
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
5959
60-
# Pull request dose not get the gitub action secrets
61-
# this section will be applied to the deploy workflows
62-
- name: Setup Auth for Private Repo
63-
uses: webfactory/[email protected]
60+
# Checkout and import zappa config
61+
- name: Checkout secrets repo
62+
uses: actions/checkout@v4
6463
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-
chmod 775 ./update_secrets.sh
71-
./update_secrets.sh
64+
repository: ${{ secrets.PYCONKR_SECRET_REPOSITORY }}
65+
ssh-key: ${{ secrets.PYCONKR_SECRET_REPOSITORY_DEPLOY_KEY }}
66+
path: secret_envs
67+
clean: false
68+
sparse-checkout-cone-mode: false
69+
sparse-checkout: |
70+
${{ steps.info.outputs.repository_name }}/zappa_settings.json
71+
- run: mv secret_envs/${{ steps.info.outputs.repository_name }}/zappa_settings.json ./zappa_settings.json && rm -rf secret_envs
7272

7373
# - name: Test with Django Test
7474
# run: |

0 commit comments

Comments
 (0)