Skip to content

Commit ec3d430

Browse files
committed
build: fix standalone server path in Makefile and package.json
- Updated Makefile to check for the standalone server in the correct path. - Adjusted start scripts in package.json to reflect the new server path. - Removed redundant webapp build step from CI workflow.
1 parent 804c370 commit ec3d430

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

.github/workflows/prod.docs.plus.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ jobs:
7777
# This job will only run if the commit message contains the word 'front'.
7878
if: contains(github.event.head_commit.message, 'front')
7979
steps:
80-
# Build webapp to ensure standalone server exists
81-
- name: Build webapp
82-
run: |
83-
cd packages/webapp
84-
npm run build
8580
# This step runs the build command for the front-end.
8681
- name: Build Front-end
8782
run: make build_front_production

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ build_front_stage:
9696
build_front_production:
9797
@echo "🚀 Deploying frontend to production..."
9898
@cd packages/webapp && \
99-
if [ ! -f .next/standalone/server.js ]; then \
99+
if [ ! -f .next/standalone/packages/webapp/server.js ]; then \
100100
echo "❌ No standalone server found! Build failed." && exit 1; \
101101
fi && \
102102
echo "✅ Starting PM2..." && \

packages/webapp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"dev": "next dev --turbopack",
77
"build": "next build",
88
"start": "next start",
9-
"start:prod": "PORT=3001 node .next/standalone/server.js",
10-
"start:stage": "PORT=3000 node .next/standalone/server.js",
9+
"start:prod": "PORT=3001 node .next/standalone/packages/webapp/server.js",
10+
"start:stage": "PORT=3000 node .next/standalone/packages/webapp/server.js",
1111
"pm2:start:stage": "pm2 reload pm2.config.js --env production --only nextjs_stage",
1212
"pm2:start:prod": "pm2 reload pm2.config.js --env production --only nextjs_production",
1313
"pm2:logs": "pm2 logs",

0 commit comments

Comments
 (0)