Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aengzu authored Dec 17, 2024
1 parent afb8707 commit 02478a4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,21 @@ jobs:
source: "./*"
target: "/home/ubuntu/backend"

# 4. 서버에서 Docker Compose 실행
# 4. 서버에서 .env 파일 생성
- name: Create .env file on EC2
uses: appleboy/[email protected]
with:
host: ${{ secrets.EC2_HOST }}
username: ubuntu
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd /home/ubuntu/backend
echo "KAKAO_CLIENT_ID=${{ secrets.KAKAO_CLIENT_ID }}" > .env
echo "KAKAO_SECRET=${{ secrets.KAKAO_SECRET }}" >> .env
echo "SECRET_KEY=${{ secrets.SECRET_KEY }}" >> .env
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> .env
# 5. 서버에서 Docker Compose 실행
- name: SSH into EC2 and restart Docker Compose
uses: appleboy/[email protected]
with:
Expand Down

0 comments on commit 02478a4

Please sign in to comment.