From 6af1d6ea1ffc18435812732c60a1a4cfa394e9e5 Mon Sep 17 00:00:00 2001 From: y-minion Date: Tue, 25 Nov 2025 21:21:40 +0900 Subject: [PATCH] =?UTF-8?q?ec2=20=EB=B0=B0=ED=8F=AC=EB=8B=A8=EA=B3=84?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=8B=A4=ED=8C=A8=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 실제 배포된 디렉토리의 구조를 디버깅하는 로직 추가. 기존에 압축해제된 최상단에서 의존성을 설치하는게 아닌 모노레포 구조상 apps안에 있는 editor프로젝트로 이동해 의존성 설치하도록 수정 완료. --- .github/workflows/deploy.yml | 1 + apps/editor/scripts/after_install.sh | 18 ++++++++++++++++++ apps/editor/scripts/start_server.sh | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) 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