diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 311a967..00cd1c0 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -56,8 +56,8 @@ jobs: DEPLOY_USER: ${{ secrets.IMPORTARR_DEPLOY_USER }} run: >- ssh -p "$DEPLOY_PORT" -o BatchMode=yes "$DEPLOY_USER@$DEPLOY_HOST" - sudo -n /bin/sh -c 'set -eu; cd /opt/importarr/repo; - test -z "$(git status --porcelain)"; + "sudo -n /bin/sh -c 'set -eu; cd /opt/importarr/repo; + test -z \"\$(git status --porcelain)\"; git fetch --prune origin main; git checkout -B main origin/main; - exec /bin/sh deploy/repo-upgrade.sh' + exec /bin/sh deploy/repo-upgrade.sh'"