Files
Place-Order-Trading-Bot/.gitea/workflows/deploy.yml
T
cbazza 17e6fb83e5
Deploy to Windows VPS / deploy (push) Has been cancelled
added GITEA Actions and setup
2025-12-17 08:34:55 +01:00

78 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Deploy to Windows VPS
on:
push:
branches:
- main
workflow_dispatch: # Ermöglicht manuelles Triggern
jobs:
deploy:
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy to VPS
shell: powershell
run: |
Write-Host "Starting deployment..." -ForegroundColor Green
# Navigiere zum Deployment-Verzeichnis
Set-Location "C:\TradingBot\placeorder"
# Git Pull (neueste Änderungen holen)
Write-Host "Pulling latest changes from Git..." -ForegroundColor Cyan
git pull origin main
# Optional: Python Dependencies aktualisieren
Write-Host "Updating Python dependencies..." -ForegroundColor Cyan
pip install --upgrade -r requirements.txt -ErrorAction SilentlyContinue
# Deployment-Skript ausführen
Write-Host "Running deployment script..." -ForegroundColor Cyan
.\deploy.ps1
Write-Host "Deployment completed successfully!" -ForegroundColor Green
- name: Verify Deployment
shell: powershell
run: |
Write-Host "Verifying deployment..." -ForegroundColor Yellow
# Prüfe ob Trading Bot Dateien existieren
$files = @(
"C:\TradingBot\placeorder\TradingBot_V1.6_Adaptive_Complete_CORRECTED.ipynb",
"C:\TradingBot\placeorder\trading_dashboard.py",
"C:\TradingBot\placeorder\trading_database.py"
)
foreach ($file in $files) {
if (Test-Path $file) {
Write-Host "✓ $file exists" -ForegroundColor Green
} else {
Write-Host "✗ $file missing!" -ForegroundColor Red
exit 1
}
}
Write-Host "All files verified!" -ForegroundColor Green
- name: Restart Services
shell: powershell
run: |
Write-Host "Restarting services..." -ForegroundColor Cyan
# Restart Trading Dashboard Service (falls als Service läuft)
if (Get-Service -Name "TradingDashboard" -ErrorAction SilentlyContinue) {
Restart-Service -Name "TradingDashboard" -Force
Write-Host "✓ TradingDashboard service restarted" -ForegroundColor Green
} else {
Write-Host " TradingDashboard service not found (might not be installed yet)" -ForegroundColor Yellow
}
Write-Host "Deployment process finished!" -ForegroundColor Green