diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..0bbfaff --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +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