diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2edc610c2..d371fd83b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,11 +37,14 @@ dev_build: - echo "npm install ..." - npm install --registry=http://registry.npmmirror.com - echo "npm run build" - - npm run build - - - cd /builds/nezha/nezha-fronted/nezha-fronted/dist - # 链接 minio 引入模板 + + # 编译 上传模板 + - npm run build:html - mc alias set nz $MINIO_HOST $MINIO_USER $MINIO_PWD + - mc cp dist/index.html nz/depends/template/snapshot_template.html + + - npm run build + - cd /builds/nezha/nezha-fronted/nezha-fronted/dist - mc cp nz/depends/template/snapshot_template.html ./snapshot_template.html - rm -rf nz-gui*.zip - export FILE_NAME=nz-gui-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA.zip @@ -80,9 +83,13 @@ rel_build: - cd nezha-fronted - npm install --registry=http://registry.npmmirror.com - echo "npm run build" + + - npm run build:html + - mc alias set nz $MINIO_HOST $MINIO_USER $MINIO_PWD + - mc cp dist/index.html nz/depends/template/snapshot_template.html + - npm run build - cd /builds/nezha/nezha-fronted/nezha-fronted/dist - - mc alias set nz $MINIO_HOST $MINIO_USER $MINIO_PWD - mc cp nz/depends/template/snapshot_template.html ./snapshot_template.html - zip -m nz-gui*.zip ./snapshot_template.html - mv nz-gui*.zip nz-gui-$CI_COMMIT_SHORT_SHA.zip