fix: use rsync to clean stale files during host volume sync
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 2m1s
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 2m1s
This commit is contained in:
@@ -16,9 +16,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
if command -v apt-get &> /dev/null; then
|
if command -v apt-get &> /dev/null; then
|
||||||
apt-get update
|
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
|
elif command -v apk &> /dev/null; then
|
||||||
apk add --no-cache nodejs git openjdk21
|
apk add --no-cache nodejs git openjdk21 rsync
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
@@ -26,8 +26,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Sync Code to Host Volume
|
- name: Sync Code to Host Volume
|
||||||
run: |
|
run: |
|
||||||
echo "Copying latest code to /app (Host Volume)..."
|
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/
|
cp -a . /app/
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Deploy Task on Host
|
- name: Deploy Task on Host
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user