Fix deployment to work within /opt/immersive directory
Some checks failed
Build and Deploy / build (push) Failing after 1m29s
Some checks failed
Build and Deploy / build (push) Failing after 1m29s
Move contents instead of directory itself to avoid permission issues with gitea-runner user who has write access inside but not to /opt. 🤖 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
e2216c17e8
commit
739775ea94
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@ -31,22 +31,20 @@ jobs:
|
||||
|
||||
- name: Deploy to /opt/immersive
|
||||
run: |
|
||||
# Remove old deployment (keep data directory if it exists)
|
||||
rm -rf /opt/immersive.old
|
||||
[ -d /opt/immersive ] && mv /opt/immersive /opt/immersive.old
|
||||
# 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/*
|
||||
|
||||
# Copy built files to target
|
||||
mkdir -p /opt/immersive
|
||||
cp -r . /opt/immersive/
|
||||
|
||||
# Remove unnecessary directories
|
||||
rm -rf /opt/immersive/.git /opt/immersive/.github
|
||||
|
||||
# Restore data directory from old deployment if it existed
|
||||
[ -d /opt/immersive.old/data ] && mv /opt/immersive.old/data /opt/immersive/
|
||||
|
||||
# Clean up old deployment
|
||||
rm -rf /opt/immersive.old
|
||||
# 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
|
||||
|
||||
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -2,9 +2,9 @@ name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: [ "deepdiagram" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: [ "deepdiagram" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user