From 370e1368ddbdf65d3be68b97f2f166b9888b6651 Mon Sep 17 00:00:00 2001 From: rocknroll Date: Mon, 7 Oct 2024 02:05:30 +0900 Subject: [PATCH] docs:.github/deploy.yaml --- .github/workflows/deploy.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index dba9e8d..3a5b086 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,8 +3,7 @@ name: Deploy FastAPI on: push: branches: - - main # main 브랜치에 커밋이 푸시될 때마다 실행됩니다. - + - main jobs: deploy: runs-on: ubuntu-latest @@ -22,9 +21,11 @@ jobs: run: | ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF' cd /planner # FastAPI 프로젝트 디렉토리로 이동 - git pull origin main # 최신 커밋 가져오기 + git pull origin main + ${{ secrets.USER_NAME }} + ${{ secrets.PULL_KEY }} cd /Controller - source myenv/bin/activate # 가상 환경 활성화 (필요한 경우) - pip install -r requirements.txt # 의존성 설치 - uvicorn main:app --host 0.0.0.0 --port 1500 --reload & # FastAPI 서버 시작 + source myenv/bin/activate + pip install -r requirements.txt + uvicorn main:app --host 0.0.0.0 --port 1500 --reload & EOF