test runner traffic target
Some checks failed
Build and Deploy MITM Webserver / build (push) Successful in 10s
Build and Deploy MITM Webserver / traffic_target (push) Has been cancelled

This commit is contained in:
2026-03-08 17:40:07 +01:00
parent 5ea4dd388e
commit dc76daf217
3 changed files with 162 additions and 36 deletions

View File

@@ -180,41 +180,6 @@ systemctl start gitea-act-runner
echo "==> Gitea Act Runner installiert & gestartet"
# -----------------------------
# Gitea Runner Job Script
# -----------------------------
echo "==> Setup auto-build script"
BUILD_SCRIPT="$RUNNER_DIR/build.sh"
cat >$BUILD_SCRIPT <<'EOL'
#!/bin/bash
set -e
APP_DIR="/opt/mitm-webserver"
FRONTEND_DIR="$APP_DIR/frontend"
BACKEND_DIR="$APP_DIR/backend"
BACKEND_SERVICE="mitm-backend"
cd $APP_DIR
git reset --hard
git pull
# Build Frontend
cd $FRONTEND_DIR
npm install
npm run build
# Backend Dependencies
cd $BACKEND_DIR
source venv/bin/activate
pip install -r requirements.txt
deactivate
# Restart backend
systemctl restart $BACKEND_SERVICE
EOL
chmod +x $BUILD_SCRIPT
echo "==> Setup complete! Gitea Runner will automatically build on push."
echo "Frontend: http://<server_ip>/"
echo "Backend API: http://<server_ip>/api/"