diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 19f7897..c0b5ecc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,7 @@ on: branches: - main - develop + - dev jobs: build: diff --git a/apps/editor/scripts/after_install.sh b/apps/editor/scripts/after_install.sh index c18314b..9a43432 100644 --- a/apps/editor/scripts/after_install.sh +++ b/apps/editor/scripts/after_install.sh @@ -5,4 +5,22 @@ export PATH="$NVM_BIN_PATH:$PATH" cd /home/ubuntu/application || exit 1 +# 🚨 [디버깅] ν˜„μž¬ 폴더에 뭐가 μžˆλŠ”μ§€ 확인 +echo ">>> Current Directory: $(pwd)" +echo ">>> File Structure (Depth 3):" +find . -maxdepth 3 -not -path '*/.*' + +# 2. package.json이 μ–΄λ”” μžˆλŠ”μ§€ μ°Ύμ•„μ„œ 이동 (μžλ™ 감지 둜직) +if [ -f "apps/editor/package.json" ]; then + echo ">>> Found package.json inside apps/editor! Moving there..." + cd apps/editor +elif [ -f "package.json" ]; then + echo ">>> Found package.json in root." +else + echo ">>> ERROR: Cannot find package.json anywhere!" + exit 1 +fi + + +echo ">>> Installing dependencies in $(pwd)..." pnpm install --production \ No newline at end of file diff --git a/apps/editor/scripts/start_server.sh b/apps/editor/scripts/start_server.sh index 9502c85..ea843e8 100644 --- a/apps/editor/scripts/start_server.sh +++ b/apps/editor/scripts/start_server.sh @@ -4,7 +4,7 @@ NVM_BIN_PATH="/home/ubuntu/.nvm/versions/node/v22.21.0/bin" export PATH="$NVM_BIN_PATH:$PATH" -cd /home/ubuntu/application || exit 1 +cd /home/ubuntu/application/apps/editor || exit 1 if [ ! -f /etc/nginx/conf.d/proxy_pass.inc ]; then