From 42748bbe20babe1106d2ab3d7c9df383dcf0efff Mon Sep 17 00:00:00 2001 From: Malek Tellissi Date: Sat, 12 Sep 2026 21:25:41 +0200 Subject: [PATCH] Fix deploy: clear PHP source dirs before SCP so deleted files don't persist SCP only adds/overwrites files, never deletes. Clearing app/, routes/, config/, database/, resources/, bootstrap/ before copy ensures the server always reflects the current git state exactly. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/deploy.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index cf5ee97..fa176b7 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -35,6 +35,15 @@ jobs: LOG_CHANNEL=stderr EOF + - name: PHP-Quellverzeichnisse leeren + uses: appleboy/ssh-action@v1.2.0 + with: + host: ${{ vars.VPS_HOST }} + username: ${{ vars.VPS_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + known_hosts: ${{ vars.SSH_KNOWN_HOSTS }} + script: rm -rf ~/app/app ~/app/routes ~/app/config ~/app/database ~/app/resources ~/app/bootstrap + - name: Dateien auf VPS kopieren uses: appleboy/scp-action@v0.1.7 with: