Skip to content

Commit 6af1d6e

Browse files
committed
ec2 배포단계에서 실패하는 버그 수정
실제 배포된 디렉토리의 구조를 디버깅하는 로직 추가. 기존에 압축해제된 최상단에서 의존성을 설치하는게 아닌 모노레포 구조상 apps안에 있는 editor프로젝트로 이동해 의존성 설치하도록 수정 완료.
1 parent 0e490f3 commit 6af1d6e

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- develop
8+
- dev
89

910
jobs:
1011
build:

apps/editor/scripts/after_install.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,22 @@ export PATH="$NVM_BIN_PATH:$PATH"
55

66
cd /home/ubuntu/application || exit 1
77

8+
# 🚨 [디버깅] 현재 폴더에 뭐가 있는지 확인
9+
echo ">>> Current Directory: $(pwd)"
10+
echo ">>> File Structure (Depth 3):"
11+
find . -maxdepth 3 -not -path '*/.*'
12+
13+
# 2. package.json이 어디 있는지 찾아서 이동 (자동 감지 로직)
14+
if [ -f "apps/editor/package.json" ]; then
15+
echo ">>> Found package.json inside apps/editor! Moving there..."
16+
cd apps/editor
17+
elif [ -f "package.json" ]; then
18+
echo ">>> Found package.json in root."
19+
else
20+
echo ">>> ERROR: Cannot find package.json anywhere!"
21+
exit 1
22+
fi
23+
24+
25+
echo ">>> Installing dependencies in $(pwd)..."
826
pnpm install --production

apps/editor/scripts/start_server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ NVM_BIN_PATH="/home/ubuntu/.nvm/versions/node/v22.21.0/bin"
44

55
export PATH="$NVM_BIN_PATH:$PATH"
66

7-
cd /home/ubuntu/application || exit 1
7+
cd /home/ubuntu/application/apps/editor || exit 1
88

99

1010
if [ ! -f /etc/nginx/conf.d/proxy_pass.inc ]; then

0 commit comments

Comments
 (0)