diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 3898755..a97f453 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,26 +1,19 @@ name: Deploy Standortpruefung -on: [push] + +on: + push: + branches: + - main jobs: deploy: runs-on: ubuntu-latest steps: - - name: Deploy via SSH - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.DEPLOY_HOST }} - username: ${{ secrets.DEPLOY_USER }} - key: ${{ secrets.DEPLOY_SSH_KEY }} - script: | - # 1. In den Zielordner wechseln (Checkliste Punkt 5) - mkdir -p /opt/automation-stack/apps/wind-tool-standortpruefung - cd /opt/automation-stack/apps/wind-tool-standortpruefung + - name: Code holen + uses: actions/checkout@v4 - # 2. Code aktualisieren (Wir nutzen den Pfad direkt, um Passwort-Probleme zu umgehen) - git init . - git remote add origin https://git.enwelo-serverumgebung.cloud/gitea-enwelo-jba/wind_tool_standortprüfung.git || true - git fetch origin main - git reset --hard origin/main - - # 3. NUR diese App starten (Projektname festlegen verhindert Konflikte) - docker compose -p wind-tool-app up -d --build --force-recreate \ No newline at end of file + - name: App bauen und starten + run: | + # Da der Runner Zugriff auf den Docker-Socket hat, + # baut er die App direkt dort, wo die Dateien liegen. + docker compose up -d --build --force-recreate \ No newline at end of file