Commit 1af43f97 authored by 张涵's avatar 张涵

chore: update pnpm params position

parent 704a790d
...@@ -18,10 +18,9 @@ ...@@ -18,10 +18,9 @@
# variables: # variables:
# NginxAliasDirectory: bakingCenter # NginxAliasDirectory: bakingCenter
# 环境变量 # 环境变量
variables: variables:
GIT_SUBMODULE_STRATEGY: recursive # 开启子模块 GIT_SUBMODULE_STRATEGY: recursive # 开启子模块
stages: stages:
- check_and_cicd - check_and_cicd
...@@ -41,17 +40,17 @@ check_and_cicd: ...@@ -41,17 +40,17 @@ check_and_cicd:
# 打印Ng目录别名 # 打印Ng目录别名
- echo -e "NginxAliasDirectory:${NginxAliasDirectory}" - echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
# fnm Node版本管理器切换版本 # fnm Node版本管理器切换版本
- '[[ -n $Node_VERSION ]] && fnm use $Node_VERSION' - "[[ -n $Node_VERSION ]] && fnm use $Node_VERSION"
# 安装依赖 # 安装依赖
- pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/ --color - pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/ --color
# 编译 # 编译
- '[[ ${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 --color ${options} - pnpm --color run build ${options}
# 部署OSS # 部署OSS
- '[[ ${EnableOSS} = "true" ]] && ossutil64 cp -rf dist/ oss://zmcms-cn-vue/${NginxAliasDirectory} --exclude "*.html" --exclude ".htaccess" && echo "推送对象存储成功!"' - '[[ ${EnableOSS} = "true" ]] && ossutil64 cp -rf dist/ oss://zmcms-cn-vue/${NginxAliasDirectory} --exclude "*.html" --exclude ".htaccess" && echo "推送对象存储成功!"'
- '[[ $? != 0 ]] && echo "部署出错!" && exit 1' - '[[ $? != 0 ]] && echo "部署出错!" && exit 1'
# 部署服务器 # 部署服务器
- 'webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html' - "webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
- ssh www@192.168.192.69 "mkdir -p ${webpath}" - ssh www@192.168.192.69 "mkdir -p ${webpath}"
- rsync --quiet -azv --delete dist/ www@192.168.192.69:${webpath} - rsync --quiet -azv --delete dist/ www@192.168.192.69:${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