Files
Portfolio/.gitlab-ci.yml
T

34 lines
703 B
YAML

image: oven/bun:alpine
stages:
- build
cache:
key:
files:
- bun.lock
paths:
- .next/cache/
- node_modules/
build_job:
stage: build
# Target the specific runner we just created
tags:
- nextjs
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- echo "Installing dependencies..."
- bun ci # 'npm ci' is faster and safer for CI/CD than 'npm install'
- echo "Building the Next.js application..."
- bun run build
# Save the build output so it can be used in later deployment stages
artifacts:
paths:
- .next/
- public/
- package.json
expire_in: 1 week