From 83d630347712dba19b8ffdbab40327feb35e5a90 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Tue, 8 Jul 2025 00:12:23 +0900 Subject: [PATCH] Fix tar 'file changed as we read it' error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create archive in /tmp/deploy-build to avoid path conflicts - Add --exclude='*.tar.gz' to prevent self-archiving - Add --warning=no-file-changed to ignore harmless warnings - Prevents Exit code 1 from tar file change detection 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f0f26cb..3cfdcf5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -57,10 +57,12 @@ jobs: "ls -la /var/run/docker.sock && id" - name: Create deployment archive - run: tar czf deploy.tar.gz --exclude='.git' . + run: | + mkdir -p /tmp/deploy-build + tar czf /tmp/deploy-build/deploy.tar.gz --exclude='.git' --exclude='*.tar.gz' --warning=no-file-changed . - name: Copy archive to NAS - run: scp -o ConnectTimeout=10 -o ServerAliveInterval=60 -P ${{ secrets.NAS_PORT }} deploy.tar.gz admin@${{ secrets.NAS_HOST }}:/tmp/ + run: scp -o ConnectTimeout=10 -o ServerAliveInterval=60 -P ${{ secrets.NAS_PORT }} /tmp/deploy-build/deploy.tar.gz admin@${{ secrets.NAS_HOST }}:/tmp/ - name: Deploy with atomic swap run: |