From 5a2837062f219e0cdd84333255097c97ab921bc6 Mon Sep 17 00:00:00 2001 From: "shdhkims@naver.com" <49316394+shdhkim@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:23:21 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=B0=B0=ED=8F=AC=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 37 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cefb6b2..d51fc0d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,11 +41,11 @@ jobs: push: true tags: ${{ secrets.DOCKER_USERNAME }}/flask-app:latest - # 6. EC2로 배포 - - name: Deploy to EC2 + # 6. EC2로 배포 (Docker Pull 방식) + - name: Deploy to EC2 via Docker Pull env: - HOST: 3.39.237.18 # EC2 퍼블릭 IP 또는 도메인 - USER: ${{ secrets.DEPLOY_USER }} # EC2 SSH 사용자 이름 + HOST: 3.39.237.18 # EC2 퍼블릭 IP + USER: ${{ secrets.DEPLOY_USER }} # EC2 사용자 이름 KEY: ${{ secrets.DEPLOY_KEY }} # SSH 개인 키 IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/flask-app:latest run: | @@ -56,7 +56,7 @@ jobs: echo "Adding $HOST to known_hosts" ssh-keyscan -H $HOST >> ~/.ssh/known_hosts || exit 1 - # EC2 접속 및 Docker Compose 실행 + # EC2 접속 및 Docker 실행 ssh -i deploy_key.pem $USER@$HOST <