Fix deployment to preserve data dir in place
All checks were successful
Build and Deploy / build (push) Successful in 1m35s
All checks were successful
Build and Deploy / build (push) Successful in 1m35s
Use find to delete all files except data directory instead of moving to /tmp which fails due to sticky bit permissions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
739775ea94
commit
82807dcfce
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -31,11 +31,8 @@ jobs:
|
||||
|
||||
- name: Deploy to /opt/immersive
|
||||
run: |
|
||||
# Backup data directory if it exists
|
||||
[ -d /opt/immersive/data ] && mv /opt/immersive/data /tmp/immersive-data
|
||||
|
||||
# Remove old files (except data which we moved)
|
||||
rm -rf /opt/immersive/*
|
||||
# Remove old files except data directory
|
||||
find /opt/immersive -mindepth 1 -maxdepth 1 ! -name 'data' -exec rm -rf {} +
|
||||
|
||||
# Copy built files to target
|
||||
cp -r . /opt/immersive/
|
||||
@ -43,9 +40,6 @@ jobs:
|
||||
# Remove unnecessary directories
|
||||
rm -rf /opt/immersive/.git /opt/immersive/.github
|
||||
|
||||
# Restore data directory
|
||||
[ -d /tmp/immersive-data ] && mv /tmp/immersive-data /opt/immersive/data
|
||||
|
||||
# Set permissions on start.sh
|
||||
chmod +x /opt/immersive/start.sh
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user