diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3a5b086..fa9070b 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -20,12 +20,12 @@ jobs: - name: Deploy to EC2 run: | ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF' - cd /planner # FastAPI 프로젝트 디렉토리로 이동 + cd /planner 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 & + pkill -f uvicorn && nohup uvicorn main:app --host 0.0.0.0 --port 1500 > uvicorn.log 2>&1 & EOF