fix: use rsync to clean stale files during host volume sync
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 2m1s

This commit is contained in:
jade
2026-07-29 13:25:10 +09:00
parent 752aae4dde
commit b0bf4a9c68

View File

@@ -16,9 +16,9 @@ jobs:
run: |
if command -v apt-get &> /dev/null; then
apt-get update
apt-get install -y nodejs git openjdk-21-jdk
apt-get install -y nodejs git openjdk-21-jdk rsync
elif command -v apk &> /dev/null; then
apk add --no-cache nodejs git openjdk21
apk add --no-cache nodejs git openjdk21 rsync
fi
- name: Checkout Code
@@ -26,8 +26,13 @@ jobs:
- name: Sync Code to Host Volume
run: |
echo "Copying latest code to /app (Host Volume)..."
cp -a . /app/
echo "Copying latest code to /app (Host Volume) and removing stale files..."
if command -v rsync &> /dev/null; then
rsync -a --delete --exclude='.git' . /app/
else
rm -rf /app/dap-* /app/src /app/build.gradle /app/settings.gradle
cp -a . /app/
fi
- name: Deploy Task on Host
run: |