add build and deploy workflow for MITM Webserver
This commit is contained in:
38
.gitea/workflow/build.yaml
Normal file
38
.gitea/workflow/build.yaml
Normal 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
|
||||||
Reference in New Issue
Block a user