File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 echo "}" >> git_config.json
5959 echo "::set-output name=REPO_NAME::$REPO_NAME"
6060
61- - name : 文档 - 文档库克隆
62- working-directory : ./src/
63- run : |
64- rm README.md
65-
66- # 文档的克隆、构建、部署。注意 `clone --depth 1` 只拉最近一次提交,减少时间
67- # git clone --depth 1 https://github.com/${GITHUB_REPOSITORY}.git # 如果有多个clone项则替换成这个,避免冲突
68- git clone --depth 1 https://github.com/${GITHUB_REPOSITORY}.git temp_repo
69-
70- # 该仓库为代理仓库,使用链接仓库而非此仓库
71- if [ -f temp_repo/agency ]; then
72- GIT_LINK=$(head -n 1 temp_repo/agency)
73- rm -rf temp_repo
74- git clone --depth 1 $GIT_LINK temp_repo
75- echo "with agency"
76- else
77- echo "without agency"
78- fi
79-
80- - name : 文档 - 文档库docs文件夹的处理
81- working-directory : ./src/
82- run : |
83- if [ -d temp_repo/docs ]; then
84- find temp_repo/* -maxdepth 0 -name docs -prune -o -exec rm -rf {} \;
85- mv temp_repo/docs/* .
86- rm -rf temp_repo
87- echo "with docs"
88- else
89- rsync -a temp_repo/ .
90- rm -rf temp_repo
91- echo "without docs"
92- fi
93-
94- # [!code] 根据实际情况修改 (需要在仓库配置写入以及和文档仓库clone这两个步骤的后面)
61+ # [!code] 根据实际情况修改
9562 - name : 配置 - 设置
9663 working-directory : ./
9764 run : |
@@ -101,6 +68,18 @@ jobs:
10168 rm -f ./src/.vuepress/theme_cover.js
10269 pnpm run gen-config
10370
71+ # 文档的克隆、构建、部署。注意 `clone --depth 1` 只拉最近一次提交,减少时间
72+ - name : 文档 - 文档库克隆
73+ working-directory : ./src/
74+ run : |
75+ # --depth 1 选项会损失git历史,但能加速编译。可自行启用/关闭
76+ # 注意若使用该选项,必须要删除 .git 文件夹,避免时间和贡献者错乱
77+ git clone --depth 1 https://github.com/${GITHUB_REPOSITORY}.git temp_repo
78+ rm -rf temp_repo/.git
79+ rsync -a temp_repo/ .
80+ rm -rf temp_repo
81+ # git clone --depth 1 https://github.com/${GITHUB_REPOSITORY}.git # 如果有多个clone项则替换成这个,避免冲突
82+
10483 - name : 文档 - 构建
10584 env :
10685 NODE_OPTIONS : --max_old_space_size=20480
Original file line number Diff line number Diff line change 88 " obsidian-matrix" ,
99 " obsidian-tikzjax" ,
1010 " quickadd" ,
11- " quick-latex" ,
12- " pseudocode-in-obs"
11+ " quick-latex"
1312]
You can’t perform that action at this time.
0 commit comments