From c99c9bfe78f3d4907aa15ce16e2ff26d7b45f900 Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Thu, 9 Oct 2025 16:51:29 -0300 Subject: [PATCH] =?UTF-8?q?ci:=20rsync=20resiliente=20a=20perms=20(no-time?= =?UTF-8?q?s=20+=20inplace=20+=20sudo=20fallback)\n\n-=20Adiciona=20--no-t?= =?UTF-8?q?imes=20e=20--inplace=20para=20evitar=20settime/mkstemp.\n-=20Te?= =?UTF-8?q?nta=20rsync=20normal;=20se=20falhar=20por=20permiss=C3=A3o,=20r?= =?UTF-8?q?epete=20com=20sudo=20-n.\n-=20Mant=C3=A9m=20filtros=20e=20delet?= =?UTF-8?q?e=20como=20antes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-cd-web-desktop.yml | 48 ++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd-web-desktop.yml b/.github/workflows/ci-cd-web-desktop.yml index df18212..ff68e05 100644 --- a/.github/workflows/ci-cd-web-desktop.yml +++ b/.github/workflows/ci-cd-web-desktop.yml @@ -72,7 +72,8 @@ jobs: - name: Sync workspace to APP_DIR (preserving local env) run: | mkdir -p "$APP_DIR" - rsync -az --no-perms --no-owner --no-group --delete \ + RSYNC_FLAGS="-az --inplace --no-times --no-perms --no-owner --no-group --delete" + rsync $RSYNC_FLAGS \ --filter='protect node_modules' \ --filter='protect node_modules/**' \ --filter='protect .pnpm-store' \ @@ -90,7 +91,26 @@ jobs: --exclude '.env*' \ --exclude 'apps/desktop/.env*' \ --exclude 'convex/.env*' \ - ./ "$APP_DIR"/ + ./ "$APP_DIR"/ \ + || sudo -n rsync $RSYNC_FLAGS \ + --filter='protect node_modules' \ + --filter='protect node_modules/**' \ + --filter='protect .pnpm-store' \ + --filter='protect .pnpm-store/**' \ + --filter='protect .env' \ + --filter='protect .env*' \ + --filter='protect apps/desktop/.env*' \ + --filter='protect convex/.env*' \ + --exclude '.git' \ + --exclude '.next' \ + --exclude 'node_modules' \ + --exclude 'node_modules/**' \ + --exclude '.pnpm-store' \ + --exclude '.pnpm-store/**' \ + --exclude '.env*' \ + --exclude 'apps/desktop/.env*' \ + --exclude 'convex/.env*' \ + ./ "$APP_DIR"/ - name: Install and build (Next.js) run: | @@ -127,7 +147,8 @@ jobs: - name: Sync workspace to APP_DIR (preserving local env) run: | mkdir -p "$APP_DIR" - rsync -az --no-perms --no-owner --no-group --delete \ + RSYNC_FLAGS="-az --inplace --no-times --no-perms --no-owner --no-group --delete" + rsync $RSYNC_FLAGS \ --filter='protect node_modules' \ --filter='protect node_modules/**' \ --filter='protect .pnpm-store' \ @@ -145,7 +166,26 @@ jobs: --exclude '.env*' \ --exclude 'apps/desktop/.env*' \ --exclude 'convex/.env*' \ - ./ "$APP_DIR"/ + ./ "$APP_DIR"/ \ + || sudo -n rsync $RSYNC_FLAGS \ + --filter='protect node_modules' \ + --filter='protect node_modules/**' \ + --filter='protect .pnpm-store' \ + --filter='protect .pnpm-store/**' \ + --filter='protect .env' \ + --filter='protect .env*' \ + --filter='protect apps/desktop/.env*' \ + --filter='protect convex/.env*' \ + --exclude '.git' \ + --exclude '.next' \ + --exclude 'node_modules' \ + --exclude 'node_modules/**' \ + --exclude '.pnpm-store' \ + --exclude '.pnpm-store/**' \ + --exclude '.env*' \ + --exclude 'apps/desktop/.env*' \ + --exclude 'convex/.env*' \ + ./ "$APP_DIR"/ - name: Deploy functions to Convex self-hosted run: | docker run --rm -i \