Skip to content

Commit 13d3fe6

Browse files
authored
Update link checker config and fix some broken links (#21453)
1 parent 8b1049d commit 13d3fe6

File tree

5 files changed

+30
-14
lines changed

5 files changed

+30
-14
lines changed

.github/workflows/link-fail-fast.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
linkChecker:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v6
1111
with:
1212
fetch-depth: 2
1313

@@ -17,12 +17,19 @@ jobs:
1717
CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g")
1818
echo "all_changed_files=${CHANGED_FILES}" >> $GITHUB_OUTPUT
1919
20+
- name: Restore lychee cache
21+
uses: actions/cache@v4
22+
with:
23+
path: .lycheecache
24+
key: cache-lychee-${{ github.sha }}
25+
restore-keys: cache-lychee-
26+
2027
- name: Link Checker
2128
if: ${{ steps.changed-files.outputs.all_changed_files }}
22-
uses: lycheeverse/lychee-action@v2.3.0
29+
uses: lycheeverse/lychee-action@v2
2330
with:
2431
fail: true
2532
failIfEmpty: false
26-
args: --root-dir $(pwd) -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
33+
args: --root-dir $(pwd) --cache --max-cache-age 1d -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
2734
env:
2835
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/link.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,32 @@ jobs:
1010
linkChecker:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414

1515
- name: Download Exclude Path
1616
run: |
1717
curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore --output .lycheeignore
1818
19+
- name: Restore lychee cache
20+
uses: actions/cache@v4
21+
with:
22+
path: .lycheecache
23+
key: cache-lychee-${{ github.sha }}
24+
restore-keys: cache-lychee-
25+
1926
- name: Check Links
20-
uses: lycheeverse/lychee-action@v1.6.1
27+
uses: lycheeverse/lychee-action@v2
2128
with:
2229
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
23-
args: -E --exclude-mail -v -i -n -t 45 -- **/*.md *.md
30+
fail: true
31+
failIfEmpty: false
32+
args: --root-dir $(pwd) --cache --max-cache-age 8d -E -i -n -t 45 --exclude-path '^releases/' --exclude-path '^tidb-cloud/releases/' -- **/*.md *.md
2433
output: out.md
2534
env:
2635
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2736

2837
- name: Create Issue From File
29-
uses: peter-evans/create-issue-from-file@v4
38+
uses: peter-evans/create-issue-from-file@v6
3039
with:
3140
title: Broken Link Detected
3241
content-filepath: out.md

ai/integrations/vector-search-integrate-with-langchain.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ aliases: ['/zh/tidb/stable/vector-search-integrate-with-langchain/','/zh/tidb/de
1515
1616
> **提示**
1717
>
18-
> 你可以在 Jupyter Notebook 中查看完整的 [示例代码](https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb),或直接在 [Colab](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) 在线环境中运行
18+
> 你可以在 LangChain 文档中查看完整的[示例代码](https://docs.langchain.com/oss/python/integrations/vectorstores/tidb_vector)
1919
2020
## 前置条件
2121

@@ -148,11 +148,11 @@ TIDB_DATABASE_URL="mysql+pymysql://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<DATABASE
148148

149149
#### 步骤 4.1 下载示例文档
150150

151-
在你的项目目录下,新建 `data/how_to/` 目录,并从 [langchain-ai/langchain](https://github.com/langchain-ai/langchain) GitHub 仓库下载示例文档 [`state_of_the_union.txt`](https://github.com/langchain-ai/langchain/blob/master/docs/docs/how_to/state_of_the_union.txt)
151+
在你的项目目录下,新建 `data/how_to/` 目录,并从 [langchain-ai/langchainjs](https://github.com/langchain-ai/langchainjs) GitHub 仓库下载示例文档 [`state_of_the_union.txt`](https://github.com/langchain-ai/langchainjs/blob/main/examples/state_of_the_union.txt)
152152

153153
```shell
154154
!mkdir -p 'data/how_to/'
155-
!wget 'https://raw.githubusercontent.com/langchain-ai/langchain/master/docs/docs/how_to/state_of_the_union.txt' -O 'data/how_to/state_of_the_union.txt'
155+
!wget 'https://raw.githubusercontent.com/langchain-ai/langchainjs/refs/heads/main/examples/state_of_the_union.txt' -O 'data/how_to/state_of_the_union.txt'
156156
```
157157

158158
#### 步骤 4.2 加载并切分文档

ai/integrations/vector-search-integrate-with-llamaindex.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ aliases: ['/zh/tidb/stable/vector-search-integrate-with-llamaindex/','/zh/tidb/d
1515
1616
> **提示**
1717
>
18-
> 你可以在 Jupyter Notebook 中查看完整的 [示例代码](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb),或直接在 [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) 在线环境中运行。
18+
> 你可以在 Jupyter Notebook 中查看完整的 [示例代码](https://github.com/run-llama/llama_index/blob/main/docs/examples/vector_stores/TiDBVector.ipynb),或直接在 [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/vector_stores/TiDBVector.ipynb) 在线环境中运行。
1919
2020
## 前置条件
2121

@@ -147,11 +147,11 @@ TIDB_DATABASE_URL="mysql+pymysql://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<DATABASE
147147

148148
#### 步骤 4.1 下载示例文档
149149

150-
在你的项目目录下,新建 `data/paul_graham/` 目录,并从 [run-llama/llama_index](https://github.com/run-llama/llama_index) GitHub 仓库下载示例文档 [`paul_graham_essay.txt`](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt)
150+
在你的项目目录下,新建 `data/paul_graham/` 目录,并从 [run-llama/llama_index](https://github.com/run-llama/llama_index) GitHub 仓库下载示例文档 [`paul_graham_essay.txt`](https://github.com/run-llama/llama_index/blob/main/docs/examples/data/paul_graham/paul_graham_essay.txt)
151151

152152
```shell
153153
!mkdir -p 'data/paul_graham/'
154-
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
154+
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
155155
```
156156

157157
#### 步骤 4.2 加载文档

ticdc/ticdc-sink-to-kafka.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ token="xxxx"
211211

212212
在以上配置中,`region``registry-name` 是必填项,`access-key``secret-access-key``token` 是可选项。最佳实践是将 AWS 连接凭证设置为环境变量或存储在 `~/.aws/credentials` 文件中,而不是将它们设置在 changefeed 的配置文件中。
213213

214-
更多信息,请参阅 [AWS官方文档](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials)
214+
更多信息,请参阅 [AWS Go SDK V2 官方文档](https://docs.aws.amazon.com/zh_cn/sdk-for-go/v2/developer-guide/configure-gosdk.html#specifying-credentials)
215215

216216
## 自定义 Kafka Sink 的 Topic 和 Partition 的分发规则
217217

0 commit comments

Comments
 (0)