Compare commits

...
18 Commits
Author SHA1 Message Date
aoshiguchen 37ff5abb28 更新官网 2024-12-18 21:27:18 +08:00
aoshiguchen 4b4bcd2829 更新workflow 2024-12-18 21:23:04 +08:00
aoshiguchen adc8cb3f66 test13 2024-12-18 21:19:09 +08:00
aoshiguchen 81c3e3f219 test12 2024-12-18 21:14:24 +08:00
aoshiguchen 587359d40e test11 2024-12-18 21:07:01 +08:00
傲世孤尘 cedef6589f update pipeline-docs-build.yml 2024-12-18 13:03:34 +00:00
aoshiguchen 9a1f0c65ce test10 2024-12-18 20:53:27 +08:00
aoshiguchen 031eeae706 test9 2024-12-18 20:51:45 +08:00
傲世孤尘 32366a06f5 update pipeline-docs-build.yml 2024-12-18 12:50:59 +00:00
aoshiguchen 4873fc5084 test8 2024-12-18 20:44:49 +08:00
aoshiguchen fda50fb383 test7 2024-12-18 20:38:05 +08:00
aoshiguchen 65da4cdc53 test6 2024-12-18 20:29:03 +08:00
aoshiguchen 7b8e92b402 test5 2024-12-18 20:20:07 +08:00
aoshiguchen c5d736eafd test4 2024-12-18 20:15:21 +08:00
aoshiguchen 85e5e72363 test3 2024-12-18 20:02:04 +08:00
aoshiguchen 216bbb449f test2 2024-12-18 19:45:19 +08:00
aoshiguchen 1378e808f8 test1 2024-12-18 19:37:11 +08:00
傲世孤尘 8a23c83c83 create pipeline-docs-build.yml 2024-12-18 11:35:50 +00:00
2 changed files with 83 additions and 0 deletions
+81
View File
@@ -0,0 +1,81 @@
version: '1.0'
name: pipeline-docs-build
displayName: 官网静态资源构建
triggers:
trigger: auto
push:
branches:
precise:
- master
paths:
include:
- neutrino-proxy-vuepress.*
variables:
global:
- git_token
- username
commit_name: aoshiguchen
commit_email: [email protected]
repo_url: https://gitee.com/dromara/neutrino-proxy.git
target_branch: site
stages:
- name: stage-build
displayName: 构建
strategy: naturally
trigger: auto
executor:
- asgc
steps:
- step: build@nodejs
name: build_nodejs
displayName: Nodejs 构建
nodeVersion: 14.16.0
commands:
- '# 切换到工作目录'
- ''
- cd ./neutrino-proxy-vuepress
- '# 设置NPM源,提升安装速度'
- npm config set registry https://registry.npmmirror.com
- ''
- '# 执行编译命令'
- npm install && npm run build
- ''
- '# 资源复制,使得官网访问支持直接域名访问 + 域名后面带路径 2种访问方式'
- cp ./CNAME docs/.vuepress/dist/
- rm -rf docs/.vuepress/dist/neutrino-proxy
- rm -rf docs/.vuepress/distTemp
- cp -rf docs/.vuepress/dist/ docs/.vuepress/distTemp
- cp -rf docs/.vuepress/distTemp docs/.vuepress/dist/neutrino-proxy
- rm -rf docs/.vuepress/distTemp
- ''
- '# 初始化git仓库'
- cd docs/.vuepress/dist
- git init
- ''
- '# 设置Git信息'
- GIT_REPO_URL=https://gitee.com/dromara/neutrino-proxy.git
- GIT_USERNAME=$username
- GIT_NAME=$commit_name
- GIT_EMAIL=$commit_email
- GIT_TOKEN=$git_token
- echo "https://${GIT_USERNAME}:${GIT_TOKEN}@${GIT_REPO_URL#https://}" > ~/.git-credentials
- git config --global credential.helper store
- git remote add origin ${GIT_REPO_URL}
- git config user.name ${GIT_NAME}
- git config user.email ${GIT_EMAIL}
- ''
- '# 将构建产物推送到目标分支'
- git add -A
- git commit -m $GITEE_COMMIT_MESSAGE
- git checkout -b $target_branch
- git push -f origin $target_branch
artifacts:
- name: BUILD_ARTIFACT
path:
- ./neutrino-proxy-vuepress/docs/.vuepress/dist
caches:
- ~/.npm
- ~/.yarn
notify: []
strategy:
retry: '0'
+2
View File
@@ -8,3 +8,5 @@
[主题仓库](https://github.com/xugaoyi/vuepress-theme-vdoing)
[本仓库的gitee镜像](https://gitee.com/xugaoyi/vuepress-theme-vdoing-doc)
hello