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
|
- name: Deploy to /opt/immersive
|
||||||
run: |
|
run: |
|
||||||
# Remove old deployment (keep data directory if it exists)
|
# Backup data directory if it exists
|
||||||
rm -rf /opt/immersive.old
|
[ -d /opt/immersive/data ] && mv /opt/immersive/data /tmp/immersive-data
|
||||||
[ -d /opt/immersive ] && mv /opt/immersive /opt/immersive.old
|
|
||||||
|
# Remove old files (except data which we moved)
|
||||||
|
rm -rf /opt/immersive/*
|
||||||
|
|
||||||
# Copy built files to target
|
# Copy built files to target
|
||||||
mkdir -p /opt/immersive
|
|
||||||
cp -r . /opt/immersive/
|
cp -r . /opt/immersive/
|
||||||
|
|
||||||
# Remove unnecessary directories
|
# Remove unnecessary directories
|
||||||
rm -rf /opt/immersive/.git /opt/immersive/.github
|
rm -rf /opt/immersive/.git /opt/immersive/.github
|
||||||
|
|
||||||
# Restore data directory from old deployment if it existed
|
# Restore data directory
|
||||||
[ -d /opt/immersive.old/data ] && mv /opt/immersive.old/data /opt/immersive/
|
[ -d /tmp/immersive-data ] && mv /tmp/immersive-data /opt/immersive/data
|
||||||
|
|
||||||
# Clean up old deployment
|
|
||||||
rm -rf /opt/immersive.old
|
|
||||||
|
|
||||||
# Set permissions on start.sh
|
# Set permissions on start.sh
|
||||||
chmod +x /opt/immersive/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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "deepdiagram" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "deepdiagram" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user