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