Skip to content

Commit 1820d93

Browse files
authored
Merge pull request #1202 from nickcdon/main
🐛 修复doc文档开发、构建
2 parents 3e0df67 + 3982b0b commit 1820d93

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

.github/workflows/docs.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
uses: actions/checkout@v3
2626

2727
# 下载二进制文件
28-
- name: Download Binary Files
29-
run: |
30-
set -ex
31-
pwd
32-
bash ./scripts/base/install_bin.sh
28+
# - name: Download Binary Files
29+
# run: |
30+
# set -ex
31+
# pwd
32+
# bash ./scripts/base/install_bin.sh
3333

3434
- name: Setup Node 16
3535
uses: actions/setup-node@v3

doc/.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules
22
.temp
33
.cache
4-
dist
4+
dist
5+
tca_lib*
6+
images

doc/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"type": "module",
1010
"license": "MIT",
1111
"scripts": {
12-
"dev": "vuepress dev",
12+
"dev": "bash ./sync_images.sh & vuepress dev",
1313
"build:comment": "echo '构建帮助文档,默认base前缀为document,可根据部署需要进行相应调整'",
14-
"build": "BASE=${BASE:-CodeAnalysis} vuepress build -d ./dist"
14+
"build": "bash ./sync_images.sh & BASE=${BASE:-CodeAnalysis} vuepress build -d ./dist"
1515
},
1616
"devDependencies": {
1717
"@vuepress/plugin-search": "2.0.0-beta.63",

doc/sync_images.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
url=${LIB_GITHUB_URL:-"https://github.com/TCATools/tca_lib/releases/download/v20241015.1/tca_lib-v1.8.zip"}
4+
5+
filename=$(basename "$url")
6+
dirname=${filename%.*}
7+
8+
lib_image_path="${dirname}/tca_lib/doc/images"
9+
image_path="images"
10+
11+
if [[ ! -d $image_path ]]; then
12+
if [[ ! -d $lib_image_path ]]; then
13+
if [[ ! -f $filename ]]; then
14+
wget $url
15+
fi
16+
unzip $filename -d $dirname
17+
fi
18+
cp -r $lib_image_path $image_path
19+
fi

0 commit comments

Comments
 (0)