Fix tar 'file changed as we read it' error

- 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 <noreply@anthropic.com>
This commit is contained in:
happybell80 2025-07-08 00:12:23 +09:00
parent 3fb4618c6b
commit 83d6303477

View File

@ -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: |