mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
Update .gitlab-ci.yml file
This commit is contained in:
+20
-3
@@ -26,14 +26,23 @@ default:
|
||||
script:
|
||||
- echo "Installing dependencies..."
|
||||
- npm ci --no-audit --no-fund
|
||||
|
||||
- echo "Build env used:"
|
||||
- echo "NEXT_PUBLIC_LTI_URL=$NEXT_PUBLIC_LTI_URL"
|
||||
- echo "NEXT_PUBLIC_SSO_LOGIN_URL=$NEXT_PUBLIC_SSO_LOGIN_URL"
|
||||
- echo "NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL"
|
||||
- echo "Building Next.js static export..."
|
||||
- echo "NEXT_PUBLIC_CLIENT_ID=$NEXT_PUBLIC_CLIENT_ID"
|
||||
|
||||
# ✅ Build Next
|
||||
- echo "Building Next.js..."
|
||||
- npx next build
|
||||
|
||||
# ✅ Export static to out/ (ini yang sebelumnya missing)
|
||||
- echo "Exporting Next.js static site to ./out ..."
|
||||
- npx next export -o out
|
||||
|
||||
# build-info.json tetap kamu simpan di out/
|
||||
- |
|
||||
mkdir -p out
|
||||
cat <<EOF > out/build-info.json
|
||||
{
|
||||
"commit": "$CI_COMMIT_SHORT_SHA",
|
||||
@@ -41,9 +50,17 @@ default:
|
||||
"built_at": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")",
|
||||
"NEXT_PUBLIC_LTI_URL": "$NEXT_PUBLIC_LTI_URL",
|
||||
"NEXT_PUBLIC_SSO_LOGIN_URL": "$NEXT_PUBLIC_SSO_LOGIN_URL",
|
||||
"NEXT_PUBLIC_API_BASE_URL": "$NEXT_PUBLIC_API_BASE_URL"
|
||||
"NEXT_PUBLIC_API_BASE_URL": "$NEXT_PUBLIC_API_BASE_URL",
|
||||
"NEXT_PUBLIC_CLIENT_ID": "$NEXT_PUBLIC_CLIENT_ID"
|
||||
}
|
||||
EOF
|
||||
|
||||
# ✅ Verifikasi cepat (biar ketahuan out/ isinya bener)
|
||||
- echo "===== out/ preview ====="
|
||||
- ls -lah out | head -n 50
|
||||
- echo "===== _next assets preview ====="
|
||||
- ls -lah out/_next/static/chunks 2>/dev/null | head -n 30 || true
|
||||
|
||||
artifacts:
|
||||
name: 'out-$CI_COMMIT_SHORT_SHA'
|
||||
paths:
|
||||
|
||||
Reference in New Issue
Block a user