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:
+6
-15
@@ -19,30 +19,21 @@ default:
|
||||
cache:
|
||||
key: npm-cache
|
||||
paths:
|
||||
- .npm/
|
||||
- node_modules/
|
||||
variables:
|
||||
NPM_CONFIG_PRODUCTION: "false"
|
||||
NODE_ENV: ""
|
||||
NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.npm"
|
||||
NPM_CONFIG_PRODUCTION: 'false'
|
||||
NODE_ENV: ''
|
||||
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"
|
||||
|
||||
# Build + export (untuk static hosting di S3)
|
||||
- echo "Building Next.js..."
|
||||
- echo "Building Next.js static export..."
|
||||
- npx next build
|
||||
|
||||
# Kalau project kamu pakai static export:
|
||||
- echo "Exporting static site..."
|
||||
- npx next export
|
||||
|
||||
# Build metadata
|
||||
- |
|
||||
mkdir -p out
|
||||
cat <<EOF > out/build-info.json
|
||||
{
|
||||
"commit": "$CI_COMMIT_SHORT_SHA",
|
||||
@@ -54,7 +45,7 @@ default:
|
||||
}
|
||||
EOF
|
||||
artifacts:
|
||||
name: "out-$CI_COMMIT_SHORT_SHA"
|
||||
name: 'out-$CI_COMMIT_SHORT_SHA'
|
||||
paths:
|
||||
- out/
|
||||
expire_in: 1 week
|
||||
|
||||
Reference in New Issue
Block a user