提交 4f25b3d8 authored 作者: 张伊明's avatar 张伊明

feat 优化ci

上级 8a25c002
流水线 #98 已通过 于阶段
in 1 分 38 秒
...@@ -4,7 +4,8 @@ stages: ...@@ -4,7 +4,8 @@ stages:
cache: cache:
# cache:key 这里使用字符串,兼容性更好(部分 linter 不支持 key: { files: [...] }) # cache:key 这里使用字符串,兼容性更好(部分 linter 不支持 key: { files: [...] })
key: "npm-cache-$CI_COMMIT_REF_SLUG" # 预分支 pre 需要快速构建并实时同步,因此让 .npm 下载缓存跨分支复用
key: "npm-cache-global"
paths: paths:
- .npm/ - .npm/
policy: pull-push policy: pull-push
...@@ -63,7 +64,7 @@ deploy_pre: ...@@ -63,7 +64,7 @@ deploy_pre:
echo "skip deploy: not latest pipeline after debounce (latest=$LATEST_PIPELINE_ID current=$CI_PIPELINE_ID)"; echo "skip deploy: not latest pipeline after debounce (latest=$LATEST_PIPELINE_ID current=$CI_PIPELINE_ID)";
exit 0; exit 0;
fi fi
- rsync -av --delete dist/ /nas/kjb_service/zm/pre-project/html/ - rsync -avz --delete dist/ /nas/kjb_service/zm/pre-project/html/
# 非 protected 分支:push 时先做 build 校验(避免合并 pre 时出现 build 报错) # 非 protected 分支:push 时先做 build 校验(避免合并 pre 时出现 build 报错)
build_check: build_check:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论