mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
31 lines
749 B
YAML
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
|