Skip to content

Commit

Permalink
docs:.github/deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rocknroll17 committed Oct 6, 2024
1 parent dd9932b commit 370e136
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Deploy FastAPI
on:
push:
branches:
- main # main 브랜치에 커밋이 푸시될 때마다 실행됩니다.

- main
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -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

0 comments on commit 370e136

Please sign in to comment.