add build and deploy workflow for MITM Webserver

This commit is contained in:
2025-11-22 14:48:40 +01:00
parent 09eb339b2f
commit d122b95367

View File

@@ -0,0 +1,38 @@
name: Build and Deploy MITM Webserver
on:
push:
branches:
- main # oder der Branch, den du automatisch bauen willst
jobs:
build:
runs-on: self-hosted
steps:
# 1. Git Repository aktualisieren
- name: Update repository
run: |
git reset --hard
git pull
# 2. Frontend bauen
- name: Build Frontend
run: |
cd frontend
npm install
npm run build
# 3. Backend Dependencies
- name: Setup Backend
run: |
cd backend
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
deactivate
# 4. Backend neu starten
- name: Restart Backend
run: |
sudo systemctl restart mitm-backend