Skip to content

Commit ba43c42

Browse files
committed
Fix build agian
1 parent 9d70812 commit ba43c42

File tree

4 files changed

+44
-9
lines changed

4 files changed

+44
-9
lines changed

.github/workflows/deploy-admin.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,23 @@ jobs:
5959
echo "⚠️ WARNING: NEXT_PUBLIC_RECAPTCHA_SITE_KEY is empty!"
6060
fi
6161
62+
# Export variables explicitly for Next.js
63+
export NEXT_PUBLIC_BASE_URL="$NEXT_PUBLIC_BASE_URL"
64+
export NEXT_PUBLIC_RECAPTCHA_SITE_KEY="$NEXT_PUBLIC_RECAPTCHA_SITE_KEY"
65+
6266
npx nx build admin --configuration=production
6367
64-
echo "✅ Build complete - NEXT_PUBLIC variables embedded in bundle"
68+
echo "✅ Build complete"
69+
echo "🔍 Verifying NEXT_PUBLIC variables are embedded in bundle..."
70+
71+
# Check if variables are in the built JavaScript bundles
72+
if grep -r "$NEXT_PUBLIC_BASE_URL" dist/apps/admin/.next/static/chunks/*.js 2>/dev/null; then
73+
echo "✅ NEXT_PUBLIC_BASE_URL found in bundle"
74+
else
75+
echo "⚠️ WARNING: NEXT_PUBLIC_BASE_URL not found in bundle - checking further..."
76+
echo " Searching in all build files..."
77+
find dist/apps/admin/.next -name "*.js" -exec grep -l "$NEXT_PUBLIC_BASE_URL" {} \; | head -5 || echo " Not found in any JS files!"
78+
fi
6579
6680
- name: Install doctl
6781
uses: digitalocean/[email protected]

.github/workflows/deploy-lems.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,23 @@ jobs:
5959
echo "⚠️ WARNING: NEXT_PUBLIC_RECAPTCHA_SITE_KEY is empty!"
6060
fi
6161
62+
# Export variables explicitly for Next.js
63+
export NEXT_PUBLIC_BASE_URL="$NEXT_PUBLIC_BASE_URL"
64+
export NEXT_PUBLIC_RECAPTCHA_SITE_KEY="$NEXT_PUBLIC_RECAPTCHA_SITE_KEY"
65+
6266
npx nx build frontend --configuration=production
6367
64-
echo "✅ Build complete - NEXT_PUBLIC variables embedded in bundle"
68+
echo "✅ Build complete"
69+
echo "🔍 Verifying NEXT_PUBLIC variables are embedded in bundle..."
70+
71+
# Check if variables are in the built JavaScript bundles
72+
if grep -r "$NEXT_PUBLIC_BASE_URL" dist/apps/frontend/.next/static/chunks/*.js 2>/dev/null; then
73+
echo "✅ NEXT_PUBLIC_BASE_URL found in bundle"
74+
else
75+
echo "⚠️ WARNING: NEXT_PUBLIC_BASE_URL not found in bundle - checking further..."
76+
echo " Searching in all build files..."
77+
find dist/apps/frontend/.next -name "*.js" -exec grep -l "$NEXT_PUBLIC_BASE_URL" {} \; | head -5 || echo " Not found in any JS files!"
78+
fi
6579
6680
- name: Install doctl
6781
uses: digitalocean/[email protected]

.github/workflows/deploy-portal.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,22 @@ jobs:
5353
echo " ⚠️ WARNING: NEXT_PUBLIC_BASE_URL is empty!"
5454
fi
5555
56+
# Export variables explicitly for Next.js
57+
export NEXT_PUBLIC_BASE_URL="$NEXT_PUBLIC_BASE_URL"
58+
5659
npx nx build portal --configuration=production
5760
58-
echo "✅ Build complete - NEXT_PUBLIC variables embedded in bundle"
61+
echo "✅ Build complete"
62+
echo "🔍 Verifying NEXT_PUBLIC variables are embedded in bundle..."
63+
64+
# Check if variables are in the built JavaScript bundles
65+
if grep -r "$NEXT_PUBLIC_BASE_URL" dist/apps/portal/.next/static/chunks/*.js 2>/dev/null; then
66+
echo "✅ NEXT_PUBLIC_BASE_URL found in bundle"
67+
else
68+
echo "⚠️ WARNING: NEXT_PUBLIC_BASE_URL not found in bundle - checking further..."
69+
echo " Searching in all build files..."
70+
find dist/apps/portal/.next -name "*.js" -exec grep -l "$NEXT_PUBLIC_BASE_URL" {} \; | head -5 || echo " Not found in any JS files!"
71+
fi
5972
6073
- name: Install doctl
6174
uses: digitalocean/[email protected]

tsconfig.base.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,11 @@
1717
"paths": {
1818
"@lems/database": ["libs/database/src/index.ts"],
1919
"@lems/localization": ["libs/localization/src/index.ts"],
20-
"@lems/localization/*": ["libs/localization/src/lib/*"],
2120
"@lems/presentations": ["libs/presentations/src/index.ts"],
22-
"@lems/season": ["libs/season/src/index.ts"],
2321
"@lems/shared": ["libs/shared/src/index.ts"],
2422
"@lems/shared/*": ["libs/shared/src/lib/*"],
2523
"@lems/types": ["libs/types/src/index.ts"],
2624
"@lems/types/*": ["libs/types/src/lib/*"],
27-
"@lems/utils": ["libs/utils/src/index.ts"],
28-
"@lems/utils/arrays": ["libs/utils/arrays/src/index.ts"],
29-
"@lems/utils/objects": ["libs/utils/objects/src/index.ts"],
30-
"@lems/utils/random": ["libs/utils/random/src/index.ts"]
3125
}
3226
},
3327
"exclude": ["node_modules", "tmp"]

0 commit comments

Comments
 (0)