Files
DefectingCat.github.io/.gitlab-ci.yml
2024-05-22 11:47:11 +08:00

31 lines
749 B
YAML

stages:
- build
image: 'node:latest'
before_script:
- apt update -y
- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
- mkdir public
build:pretty-check:
stage: build
script:
- pnpm i
- pnpm pretty-check
build:local:
stage: build
script:
- pnpm build-local
- mkdir .next/standalone/public && cp -aR public/* .next/standalone/public
- mkdir .next/standalone/public/_next && cp -aR .next/static/ .next/standalone/public/_next
- 'mv .next/standalone/ public/'
artifacts:
paths:
- public/standalone