Skip to content

Commit e77e469

Browse files
committed
Merge branch 'master' into translate/docs-cn-9884
2 parents dde5c2e + 686e684 commit e77e469

File tree

360 files changed

+15271
-2906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+15271
-2906
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ By default, **CHOOSE MASTER ONLY** so your changes will be applied to the next T
1919
For details, see [tips for choosing the affected versions](https://github.com/pingcap/docs/blob/master/CONTRIBUTING.md#guideline-for-choosing-the-affected-versions).
2020

2121
- [ ] master (the latest development version)
22-
- [ ] v6.2 (TiDB 6.2 versions)
22+
- [ ] v6.3 (TiDB 6.3 versions)
2323
- [ ] v6.1 (TiDB 6.1 versions)
2424
- [ ] v5.4 (TiDB 5.4 versions)
2525
- [ ] v5.3 (TiDB 5.3 versions)

.github/workflows/bot.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/pr_reminder.py;
1717
pip3 install lxml;
1818
python3 pr_reminder.py "$WEBHOOK"
19-
# - name: Run PR reminder by assignee
20-
# env:
21-
# WEBHOOK: ${{secrets.BOT_WEBHOOK_URL}}
22-
# run: |
23-
# wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/pr_reminder_basedon_assignee.py;
24-
# pip3 install lxml;
25-
# python3 pr_reminder_basedon_assignee.py "$WEBHOOK"
19+
- name: Run PR reminder by assignee
20+
env:
21+
WEBHOOK: ${{secrets.BOT_WEBHOOK_URL}}
22+
run: |
23+
wget https://raw.githubusercontent.com/pingcap/docs/master/scripts/pr_reminder_basedon_assignee.py;
24+
pip3 install lxml;
25+
python3 pr_reminder_basedon_assignee.py "$WEBHOOK"

.github/workflows/dispatch.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ name: Trigger docs site update
22

33
on:
44
push:
5+
paths-ignore:
6+
- ".github/**"
57
branches:
68
- master
79
- release-*
8-
- i18n-ja-release-5.4
910

1011
jobs:
1112
trigger:
@@ -18,10 +19,11 @@ jobs:
1819
run: |
1920
echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})"
2021
21-
- name: Repository Dispatch
22-
uses: peter-evans/repository-dispatch@v1
23-
with:
24-
token: ${{ secrets.PR_TRIGGER_BUILD_TOKEN }}
25-
repository: pingcap/website-docs
26-
event-type: ${{ github.repository }}/${{ github.ref_name }}-${{ steps.extract.outputs.sha }}
27-
client-payload: '{ "repo": "${{ github.repository }}", "ref": "${{ github.ref_name }}", "sha": "${{ github.sha }}" }'
22+
- name: trigger docs-staging workflow
23+
run: |
24+
curl \
25+
-X POST \
26+
-H "Accept: application/vnd.github+json" \
27+
-H "Authorization: token ${{ secrets.DOCS_STAGING }}" \
28+
https://api.github.com/repos/pingcap/docs-staging/actions/workflows/update.yml/dispatches \
29+
-d '{"ref":"main","inputs":{"full": "false", "repo":"${{ github.repository }}","branch":"${{ github.ref_name }}"}}'

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Links (Fail Fast)
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
linkChecker:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 2
13+
14+
- name: 'Get a list of changed markdown files to process'
15+
id: changed-files
16+
run: |
17+
CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g")
18+
echo "::set-output name=all_changed_files::${CHANGED_FILES}"
19+
20+
- name: Download Exclude Path
21+
run: |
22+
curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore -O
23+
24+
- name: Link Checker
25+
if: ${{ steps.changed-files.outputs.all_changed_files }}
26+
uses: lycheeverse/[email protected]
27+
with:
28+
fail: true
29+
args: -E --exclude-mail -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/link.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
uses: lycheeverse/[email protected]
2121
with:
2222
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
23-
args: -E --exclude-mail -v -i -n -t 45 -- **/*.md
23+
# Accept 429 for now due to github rate limit.
24+
# See https://github.com/lycheeverse/lychee/issues/634
25+
args: -E --exclude-mail -i -n -t 45 -- **/*.md *.md
2426
output: out.md
2527
env:
2628
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Prevent Deletion
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
check:
13+
permissions:
14+
checks: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- name: Check changes
22+
run: |
23+
if git diff --name-only --diff-filter 'D' '${{ github.event.pull_request.base.sha }}' '${{ github.event.pull_request.head.sha }}' | grep -E '^media/.*\.(jpg|png|jpeg|gif)$' >/tmp/changed_files; then
24+
cat /tmp/changed_files
25+
echo '{"name":"Image","head_sha":"${{ github.event.pull_request.head.sha }}","status":"completed","conclusion":"failure"}' > /tmp/body.json
26+
jq \
27+
--arg count "$(wc -l /tmp/changed_files | awk '{print $1}')" \
28+
--arg summary "$(cat /tmp/changed_files | sed 's/^/- /')" \
29+
'.output.title = "Found " + $count + " deleted images" | .output.summary = $summary' \
30+
/tmp/body.json > /tmp/body2.json
31+
else
32+
echo '{"name":"Image Deletion Check","head_sha":"${{ github.event.pull_request.head.sha }}","status":"completed","conclusion":"success","output":{"title":"OK","summary":"No deleted images"}}' > /tmp/body2.json
33+
fi
34+
- name: Publish result
35+
run: |
36+
curl \
37+
-sSL \
38+
-X POST \
39+
-H "Accept: application/vnd.github+json" \
40+
-H "Authorization: token ${{ github.token }}" \
41+
'https://api.github.com/repos/${{ github.repository }}/check-runs' \
42+
-T '/tmp/body2.json'

.lycheeignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ http://grafana_ip:3000.*
1010
http://\$?\{remote-server-ip}:3000.*
1111
file:///home/runner/work/(docs|docs-cn)/(docs|docs-cn)/develop/.*
1212
file://.*https:/%7BnodeIP%7D:%7BnodePort%7D/dashboard
13-
file://.*?http:/\$%7BPD_IP%7D:\$%7BPD_PORT%7D/dashboard.*
13+
file://.*?http:/\$%7BPD_IP%7D:\$%7BPD_PORT%7D/dashboard.*
14+
http://\{grafana-ip\}:3000
15+
http://\{pd-ip\}:2379/dashboard

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Currently, we maintain the following versions of TiDB documentation in different
2424
| Branch name | TiDB docs version |
2525
| :---------|:----------|
2626
| [`master`](https://github.com/pingcap/docs/tree/master) | The latest development version |
27+
| [`release-6.2`](https://github.com/pingcap/docs/tree/release-6.2) | 6.2 Development Milestone Release |
2728
| [`release-6.1`](https://github.com/pingcap/docs/tree/release-6.1) | 6.1 LTS (Long-Term Support) version |
2829
| [`release-6.0`](https://github.com/pingcap/docs/tree/release-6.0) | 6.0 Development Milestone Release |
2930
| [`release-5.4`](https://github.com/pingcap/docs/tree/release-5.4) | 5.4 stable version |

0 commit comments

Comments
 (0)