Commit 6e09ce50 authored by 张涵's avatar 张涵

perf: 优化ci速度

parent 342e482d
...@@ -39,14 +39,12 @@ check_and_cicd: ...@@ -39,14 +39,12 @@ check_and_cicd:
tags: tags:
- runner-vue - runner-vue
script: script:
# NVM Node版本管理器切换版本 # 打印Ng目录别名
- '[[ -n $Node_VERSION ]] && nvm use $Node_VERSION' - echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
- node -v # fnm Node版本管理器切换版本
- '[[ -n $Node_VERSION ]] && fnm use $Node_VERSION'
# 安装依赖 # 安装依赖
- pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/ - pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/
# 代码检测
# - 'pnpm run check-branch-reconst || echo "" '
# - '[[ ${CI_BUILD_REF_NAME} != "dev" ]] && echo "安装、检测完成!" && exit 0 || echo "开始编译、部署,请稍等..."'
# 编译 # 编译
- echo -e "NginxAliasDirectory:${NginxAliasDirectory}" - echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
- '[[ ${IsVite} = "true" ]] && PathType="base" || PathType="assetPath"' - '[[ ${IsVite} = "true" ]] && PathType="base" || PathType="assetPath"'
...@@ -59,5 +57,3 @@ check_and_cicd: ...@@ -59,5 +57,3 @@ check_and_cicd:
- "webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html" - "webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
- mkdir -p ${webpath} - mkdir -p ${webpath}
- rsync -azv --delete dist/ ${webpath} - rsync -azv --delete dist/ ${webpath}
- rm -rf node_modules dist
- echo "WEB部署目录:"${webpath}
...@@ -39,16 +39,13 @@ check_and_cicd: ...@@ -39,16 +39,13 @@ check_and_cicd:
tags: tags:
- runner-vue - runner-vue
script: script:
# NVM Node版本管理器切换版本 # 打印Ng目录别名
- '[[ -n $Node_VERSION ]] && nvm use $Node_VERSION' - echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
- node -v # fnm Node版本管理器切换版本
- '[[ -n $Node_VERSION ]] && fnm use $Node_VERSION'
# 安装依赖 # 安装依赖
- pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/ - pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/
# 代码检测
# - 'pnpm run check-branch-reconst || echo "" '
# - '[[ ${CI_BUILD_REF_NAME} != "dev" ]] && echo "安装、检测完成!" && exit 0 || echo "开始编译、部署,请稍等..."'
# 编译 # 编译
- echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
- '[[ ${IsVite} = "true" ]] && PathType="base" || PathType="assetPath"' - '[[ ${IsVite} = "true" ]] && PathType="base" || PathType="assetPath"'
- '[[ ${EnableOSS} = "true" ]] && options="-- --${PathType} https://rscdn.zmcms.cn/${NginxAliasDirectory}/" || options=""' - '[[ ${EnableOSS} = "true" ]] && options="-- --${PathType} https://rscdn.zmcms.cn/${NginxAliasDirectory}/" || options=""'
- pnpm run build ${options} - pnpm run build ${options}
...@@ -58,6 +55,4 @@ check_and_cicd: ...@@ -58,6 +55,4 @@ check_and_cicd:
# 部署服务器 # 部署服务器
- "webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html" - "webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
- mkdir -p ${webpath} - mkdir -p ${webpath}
- rsync -azv --delete dist/ ${webpath} - rsync -azv --delete dist/ ${webpath}
- rm -rf node_modules dist \ No newline at end of file
- echo "WEB部署目录:"${webpath}
\ No newline at end of file
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