123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- kind: pipeline
- name: default
- steps:
- - name: 生成 html,部署web,国内 cdn 加速访问
- image: cnlym/maven:3-jdk-11-alpine-aliyun
- volumes:
- - name: mvnCache
- path: /root/.m2
- - name: htmlDir
- path: /htmlDir
- commands:
- # 生成html
- - mvn clean generate-resources -B -V
- # 加备案号
- - find target/shoulder-specs/ -type f -name "*.html" | xargs sed -i 's#<div id="footer-text">#<div id="footer-text"><a href="https://beian.miit.gov.cn/" target="_blank">鲁ICP备20024731号-1</a>#g'
- # 国内访问加速: 替换 css、js 为国内七牛云 cdn 地址
- - find target/shoulder-specs/ -type f -name "*.html" | xargs sed -i 's#cdnjs.cloudflare.com/ajax/libs#cdn.staticfile.org#g'
- # 国内访问加速: 替换 google 字体地址为 其他的
- - find target/shoulder-specs/ -type f -name "*.html" | xargs sed -i 's#fonts.googleapis.com#fonts.cat.net#g'
- #- sed -i "s!cdnjs.cloudflare.com/ajax/libs!cdn.staticfile.org!g" `grep cdnjs.cloudflare -rl target/shoulder-specs/`
- # 搬运到web目录(目前不会删除历史文档,只有更新)
- - cp -r target/shoulder-specs/* /htmlDir
-
- - name: 钉钉通知
- image: guoxudongdocker/drone-dingtalk
- settings:
- token: 5f6c32b36e771df227b1ccb8898325158e12d851ae61982d1ec225a1aa58e251
- type: markdown
-
-
- volumes:
- - name: mvnCache
- host:
- path: /tmp/cache/.m2
-
- - name: htmlDir
- host:
- path: /opt/web/shoulderSpecsDocx
- trigger:
- branch:
- - master
- event:
- - push
|