Skip to content

Del:key files

Del:key files #4

Workflow file for this run

name: Deploy FastAPI
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to EC2
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF'
cd planner_server
git pull origin main
${{ secrets.USER_NAME }}
${{ secrets.PULL_KEY }}
cd Controller
source myenv/bin/activate
pip install -r requirements.txt
pkill -f uvicorn
nohup uvicorn main:app --host 0.0.0.0 --port 1500 > uvicorn.log 2>&1 &
EOF