diff --git a/.gitea/workflows/sonar-scanner.yaml b/.gitea/workflows/sonar-scanner.yaml index e3008c4..e1d86ff 100644 --- a/.gitea/workflows/sonar-scanner.yaml +++ b/.gitea/workflows/sonar-scanner.yaml @@ -68,4 +68,22 @@ jobs: timeout-minutes: 5 env: SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + - name: Deploy Wegwichtel + uses: appleboy/ssh-action@v1 + with: + host: ${{ vars.SSH_HOST }} + username: ${{ vars.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + script: |- + set -e + + cd "$HOME/Wegwichtel" + + git pull --ff-only + + systemctl --user restart wegwichtel.service + systemctl --user is-active --quiet wegwichtel.service + + echo "Wegwichtel erfolgreich aktualisiert und neu gestartet." \ No newline at end of file