Files
rheinsw-mono-repo/frontend/.gitlab-ci.yml

35 lines
809 B
YAML

cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .next/cache/
build_frontend:
stage: build
image: node:22@sha256:f6b9c31ace05502dd98ef777aaa20464362435dcc5e312b0e213121dcf7d8b95
script:
- |
cd frontend
echo "NEXT_PUBLIC_HCAPTCHA_SITE_KEY=$HCAPTCHA_SITE_KEY" > .env
echo "NEXT_PUBLIC_RECAPTCHA_SITE_KEY=$RECAPTCHA_SITE_KEY" >> .env
echo "Contents of .env file:"
cat .env
npm install
npx next build
artifacts:
paths:
- frontend/.next
- frontend/public
- frontend/package.json
- frontend/package-lock.json
expire_in: 1 hour
docker_frontend:
extends: .docker-build-template
variables:
IMAGE_NAME: frontend
WORKDIR_PATH: frontend
DOCKERFILE_PATH: Dockerfile
needs:
- build_frontend