Commit 61cd33be authored by nanahira's avatar nanahira

improve CI

parent 8e0ddd3c
Pipeline #17220 failed with stages
in 2 minutes and 28 seconds
......@@ -4,9 +4,8 @@ stages:
variables:
GIT_DEPTH: "1"
NEXT_PUBLIC_BACKEND_URL: https://nai-api.moecube.com:444
build:
.build:
stage: build
dependencies: []
tags:
......@@ -15,18 +14,34 @@ build:
- npm i -g pnpm
- pnpm install
- pnpm run build
- mv build dist
- mkdir dist
- mv build dist/$TARGET
artifacts:
paths:
- dist/
build_root:
extends: .build
variables:
TARGET: root
build_mycard:
extends: .build
variables:
TARGET: mycard
NEXT_PUBLIC_BACKEND_URL: https://nai-api.moecube.com:444
upload_to_minio:
stage: deploy
dependencies:
- build
- build_root
- build_mycard
tags:
- linux
script:
- aws s3 --endpoint=https://minio.momobako.com:9000 sync --delete dist/ s3://nanahira/naifu-frontend
- aws s3 --endpoint=https://minio.momobako.com:9000 sync --delete dist/mycard s3://nanahira/naifu-frontend
- cd dist/root
- tar -zcf - . | aws s3 --endpoint=https://minio.momobako.com:9000 cp - s3://nanahira/naifu-frontend.tar.gz
- cd ..
only:
- master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment