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: ...@@ -4,9 +4,8 @@ stages:
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
NEXT_PUBLIC_BACKEND_URL: https://nai-api.moecube.com:444
build: .build:
stage: build stage: build
dependencies: [] dependencies: []
tags: tags:
...@@ -15,18 +14,34 @@ build: ...@@ -15,18 +14,34 @@ build:
- npm i -g pnpm - npm i -g pnpm
- pnpm install - pnpm install
- pnpm run build - pnpm run build
- mv build dist - mkdir dist
- mv build dist/$TARGET
artifacts: artifacts:
paths: paths:
- dist/ - 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: upload_to_minio:
stage: deploy stage: deploy
dependencies: dependencies:
- build - build_root
- build_mycard
tags: tags:
- linux - linux
script: 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: only:
- master - 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