Skip to content

first vps commit

first vps commit #7

Workflow file for this run

name: Deploy Backend
on:
push:
branches: [back]
jobs:
deploy-backend:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
ref: back
- name: Copy backend to app directory
run: |
rsync -a --exclude='venv' --exclude='__pycache__' \
$GITHUB_WORKSPACE/ /var/www/myapp/backend/
- name: Install backend dependencies
run: |
source /var/www/myapp/backend/venv/bin/activate
pip install -r /var/www/myapp/backend/requirements.txt
- name: Restart FastAPI
run: sudo systemctl restart myapp