summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshizhendong <[email protected]>2022-01-11 15:27:54 +0800
committershizhendong <[email protected]>2022-01-11 15:27:54 +0800
commit2bd03452514bd1a841b7ffdb3832853d92b788c9 (patch)
treeb13e0375eda319c7da07f9bebbc73a38e5e4aa41
parent80035e208268062c8a90e901a2ab4ec37c0a04c8 (diff)
fix: fix ci.ymldev-cicd
-rw-r--r--.gitlab-ci.yml11
1 files changed, 5 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5d4f554d..dd34ba0e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,7 @@ cache:
- package.json
paths:
- node_modules
+ - dist/
before_script:
- export UI_TAG=$(date +%Y%m%d%H%M%S)
@@ -18,7 +19,7 @@ before_script:
generate_git-log:
stage: gen_git-log
script:
- - if (( `grep git-log.html ./public/index.html | wc -l` == 0 )); then sed -i '/<body>/ a <a style="position:fixed;bottom:20px;left:40px;z-index:999;color:#000;" target="_blank" href="./git-log.html">更新记录</a>' ./public/index.html; echo "添加更新记录链接"; fi;
+ - if (( `grep git-log.html ./public/index.html | wc -l` == 0 )); then sed -i 's+</body>+<a style="position:fixed;bottom:20px;left:40px;z-index:999;color:white;" target="_blank" href="./git-log.html">更新记录</a>\n</body>+g' ./public/index.html; echo "添加更新记录链接"; fi;
- echo "最近的100个提交记录"
- echo "<!DOCTYPE html><html><head><meta charset='utf-8'></head><body><pre>" > ./public/git-log.html
- "git log -100 --pretty=format:'%ad : %s' >> ./public/git-log.html"
@@ -26,7 +27,8 @@ generate_git-log:
- echo "处理 git-log.html 结束"
artifacts:
paths:
- - public
+ - public/index.html
+ - public/git-log.html
only:
- dev-cicd
tags:
@@ -36,12 +38,9 @@ build_project:
stage: build_project
script:
- echo "npm install ..."
- - npm install --unsafe-perm
+ - npm install --save-dev --unsafe-perm
- echo "npm run build"
- npm run build
- artifacts:
- paths:
- - dist
only:
- dev-cicd
tags: