Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
uses: actions/checkout@v3

# 下载二进制文件
- name: Download Binary Files
run: |
set -ex
pwd
bash ./scripts/base/install_bin.sh
# - name: Download Binary Files
# run: |
# set -ex
# pwd
# bash ./scripts/base/install_bin.sh

- name: Setup Node 16
uses: actions/setup-node@v3
Expand Down
4 changes: 3 additions & 1 deletion doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
.temp
.cache
dist
dist
tca_lib*
images
4 changes: 2 additions & 2 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"type": "module",
"license": "MIT",
"scripts": {
"dev": "vuepress dev",
"dev": "bash ./sync_images.sh & vuepress dev",
"build:comment": "echo '构建帮助文档,默认base前缀为document,可根据部署需要进行相应调整'",
"build": "BASE=${BASE:-CodeAnalysis} vuepress build -d ./dist"
"build": "bash ./sync_images.sh & BASE=${BASE:-CodeAnalysis} vuepress build -d ./dist"
},
"devDependencies": {
"@vuepress/plugin-search": "2.0.0-beta.63",
Expand Down
19 changes: 19 additions & 0 deletions doc/sync_images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

url=${LIB_GITHUB_URL:-"https://github.com/TCATools/tca_lib/releases/download/v20241015.1/tca_lib-v1.8.zip"}

filename=$(basename "$url")
dirname=${filename%.*}

lib_image_path="${dirname}/tca_lib/doc/images"
image_path="images"

if [[ ! -d $image_path ]]; then
if [[ ! -d $lib_image_path ]]; then
if [[ ! -f $filename ]]; then
wget $url
fi
unzip $filename -d $dirname
fi
cp -r $lib_image_path $image_path
fi
Loading