Skip to content

Commit

Permalink
Update django_CICD.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
2ming00 authored Sep 4, 2024
1 parent b3de086 commit b5a17b3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/django_CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ jobs:
with:
python-version: '3.10'

- name: Create secrets.json
uses: jsdaniell/[email protected]
with:
name: "secrets.json"
json: ${{ secrets.SECRETS }}
dir: 'aiServer'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -32,11 +39,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Create secrets.json
- name: Create secrets.json for deployment
uses: jsdaniell/[email protected]
with:
name: "secrets.json"
json: ${{ secrets.SECRETS }}
dir: 'aiServer'

- name: Deploy to EC2
env:
Expand All @@ -48,7 +56,6 @@ jobs:
chmod 400 key.pem
scp -o StrictHostKeyChecking=no -i key.pem -r ./aiServer $EC2_USER@$EC2_HOST:/home/ubuntu/
scp -o StrictHostKeyChecking=no -i key.pem ./secrets.json $EC2_USER@$EC2_HOST:/home/ubuntu/aiServer/
ssh -o StrictHostKeyChecking=no -i key.pem $EC2_USER@$EC2_HOST << EOF
cd /home/ubuntu/aiServer
Expand Down

0 comments on commit b5a17b3

Please sign in to comment.