Skip to content

Commit

Permalink
Merge branch 'master' into Frank945946/master
Browse files Browse the repository at this point in the history
Signed-off-by: Aolin <[email protected]>
  • Loading branch information
Oreoxmt committed Oct 19, 2023
2 parents f0d0c76 + 4d41725 commit 07d92df
Show file tree
Hide file tree
Showing 642 changed files with 28,402 additions and 10,018 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: TiDB Forum
url: https://ask.pingcap.com/
about: Ask a question on the TiDB Forum.
- name: TiDB Community
url: https://discord.com/invite/DQZ2dy3cuc?utm_source=doc
about: Join the TiDB community for collaborative discussions, problem solving, and insights sharing.
9 changes: 8 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<!--Thanks for your contribution to TiDB documentation. Please answer the following questions.-->
<!--
We provide several doc templates for you to use to create documentation that aligns with our style.
Please check out these templates before you submit the pull request:
https://github.com/pingcap/docs/tree/master/resources/doc-templates
-->

### First-time contributors' checklist <!--Remove this section if you're not a first-time contributor.-->

Expand All @@ -19,10 +24,12 @@ By default, **CHOOSE MASTER ONLY** so your changes will be applied to the next T
For details, see [tips for choosing the affected versions](https://github.com/pingcap/docs/blob/master/CONTRIBUTING.md#guideline-for-choosing-the-affected-versions).

- [ ] master (the latest development version)
- [ ] v7.5 (TiDB 7.5 versions)
- [ ] v7.4 (TiDB 7.4 versions)
- [ ] v7.3 (TiDB 7.3 versions)
- [ ] v7.2 (TiDB 7.2 versions)
- [ ] v7.1 (TiDB 7.1 versions)
- [ ] v7.0 (TiDB 7.0 versions)
- [ ] v6.6 (TiDB 6.6 versions)
- [ ] v6.5 (TiDB 6.5 versions)
- [ ] v6.1 (TiDB 6.1 versions)
- [ ] v5.4 (TiDB 5.4 versions)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Verify duplicated file names
run: ./scripts/verify-duplicated-file-name.sh
- name: Verify internal links and anchors - tidb only
Expand All @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Check TOC-tidb-cloud.md existence
id: check_cloud_toc
uses: andstor/file-existence-action@v2
Expand Down
126 changes: 70 additions & 56 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: cron

on:
schedule:
- cron: "30 15 * * *"
# schedule:
# - cron: "30 15 */3 * *"
workflow_dispatch:

jobs:
Expand All @@ -18,12 +18,12 @@ jobs:
- uses: actions/checkout@v3
name: Download docs repo and specified branch
with:
ref: "i18n-ja-release-5.4"
ref: "i18n-ja-release-7.1"
path: "docs"
- uses: actions/setup-node@v3
name: Setup node 16
name: Setup node 18
with:
node-version: 16
node-version: 18

- run: |
sudo apt install tree -y
Expand Down Expand Up @@ -63,59 +63,73 @@ jobs:
git commit -m "update translated files"
git push
ja-6-1:
runs-on: ubuntu-latest
# When ja-kernal version is different with cloud, open the comment and run the github action!
# ja-cloud:
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
name: Download translator repo
with:
repository: "shczhen/markdown-translator"
path: "markdown-translator"
- uses: actions/checkout@v3
name: Download docs repo and specified branch
with:
ref: "i18n-ja-release-6.1"
path: "docs"
- uses: actions/setup-node@v3
name: Setup node 16
with:
node-version: 16
# steps:
# - uses: actions/checkout@v3
# name: Download translator repo
# with:
# repository: "shczhen/markdown-translator"
# path: "markdown-translator"
# - uses: actions/checkout@v3
# name: Download docs repo and specified branch
# with:
# ref: "i18n-ja-release-7.1"
# path: "docs"
# - uses: actions/setup-node@v3
# name: Setup node 18
# with:
# node-version: 18

- run: |
sudo apt install tree -y
# - run: |
# sudo apt install tree -y

- name: Download files by comparing commits
run: |
export GH_TOKEN=${{github.token}}
cd docs
npm i
node scripts/filterUpdateFiles.js
tree tmp
cd ..
- name: Copy new files to translator folder
run: |
cp -r docs/tmp markdown-translator/markdowns
- name: Config and translate
run: |
cd markdown-translator
echo ${{secrets.GCP_KEY}} | base64 --decode >> key.json
export GOOGLE_APPLICATION_CREDENTIALS=key.json
export PROJECT_ID=${{ secrets.GCP_PROJECT_ID }}
export GLOSSARY_ID=${{ secrets.GCP_GLOSSARY_ID }}
yarn
node src/index.js
cd ..
- name: Copy translated files to docs repo
run: |
cp -r markdown-translator/output/markdowns/* docs/
# - name: Download files by comparing commits
# run: |
# export GH_TOKEN=${{github.token}}
# cd docs
# npm i
# node scripts/filterUpdateFiles.js
# tree tmp
# cd ..
# - name: Copy new files to translator folder
# run: |
# cp -r docs/tmp markdown-translator/markdowns
# - name: Config and translate
# run: |
# cd markdown-translator
# echo ${{secrets.GCP_KEY}} | base64 --decode >> key.json
# export GOOGLE_APPLICATION_CREDENTIALS=key.json
# export PROJECT_ID=${{ secrets.GCP_PROJECT_ID }}
# export GLOSSARY_ID=${{ secrets.GCP_GLOSSARY_ID }}
# yarn
# node src/index.js
# cd ..
# - name: Copy translated files to docs repo
# run: |
# cp -r markdown-translator/output/markdowns/* docs/

- name: Git commit and push
# - name: Git commit and push
# run: |
# cd docs
# git status
# git config user.name github-actions
# git config user.email [email protected]
# git add .
# git commit -m "update translated files"
# git push
dispatch:
runs-on: ubuntu-latest
needs: [ja]

steps:
- name: trigger docs-staging workflow
run: |
cd docs
git status
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "update translated files"
git push
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.DOCS_STAGING }}" \
https://api.github.com/repos/pingcap/docs-staging/actions/workflows/update.yml/dispatches \
-d '{"ref":"main","inputs":{"full": "false", "repo":"${{ github.repository }}","branch":"i18n-ja-release-7.1"}}'
1 change: 0 additions & 1 deletion .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- release-7.2
- release-7.1
- release-7.0
- release-6.6
- release-6.5
- release-6.1
- release-5.4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prevent-deletion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Find changes
run: |
git rev-parse '${{ github.event.pull_request.head.sha }}'
if git diff --name-only --diff-filter 'D' HEAD '${{ github.event.pull_request.head.sha }}' | grep -E '^media/.*\.(jpg|png|jpeg|gif)$' >/tmp/changed_files; then
if git diff --merge-base --name-only --diff-filter 'D' HEAD '${{ github.event.pull_request.head.sha }}' | grep -E '^media/.*\.(jpg|png|jpeg|gif)$' >/tmp/changed_files; then
cat /tmp/changed_files
echo '{"name":"Image Deletion Check","head_sha":"${{ github.event.pull_request.head.sha }}","status":"completed","conclusion":"failure"}' > /tmp/body.json
jq \
Expand Down
3 changes: 2 additions & 1 deletion .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ file://.*https:/%7BnodeIP%7D:%7BnodePort%7D/dashboard
file://.*?http:/\$%7BPD_IP%7D:\$%7BPD_PORT%7D/dashboard.*
http://\{grafana-ip\}:3000
http://\{pd-ip\}:2379/dashboard
http://localhost:\d+/
http://localhost:\d+/
https://github\.com/\$user/(docs|docs-cn)
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ Before you contribute, please take a quick look at some general information abou

To keep a consistent style for diagrams, we recommend using [Figma](https://www.figma.com/) to draw or design diagrams. If you need to draw a diagram, refer to the guide and use shapes or colors provided in the template.

### Pick a doc template

We provide [several doc templates](/resources/doc-templates) for you to use to create documentation that aligns with our style.

Please check out these templates before you submit a pull request:

- [Concept](/resources/doc-templates/template-concept.md)
- [Task](/resources/doc-templates/template-task.md)
- [Reference](/resources/doc-templates/template-reference.md)
- [New Feature](/resources/doc-templates/template-new-feature.md)
- [Troubleshooting](/resources/doc-templates/template-troubleshooting.md)

### Learn about docs versions

Currently, we maintain the following versions of TiDB documentation, each with a separate branch:
Expand Down
15 changes: 15 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
aliases:
sig-develop-docs-approvers:
- Oreoxmt
- qiancai
- ran-huang
sig-develop-docs-reviewers:
- Icemap
- sykp241095
- shizn
- winkyao
- shczhen
- hooopo
- Mini256
- wd0517
- it2911
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Currently, we maintain the following versions of TiDB documentation in different
| Branch name | TiDB docs version |
| :---------|:----------|
| [`master`](https://github.com/pingcap/docs/tree/master) | The latest development version |
| [`release-7.4`](https://github.com/pingcap/docs/tree/release-7.4) | 7.4 Development Milestone Release |
| [`release-7.3`](https://github.com/pingcap/docs/tree/release-7.3) | 7.3 Development Milestone Release |
| [`release-7.2`](https://github.com/pingcap/docs/tree/release-7.2) | 7.2 Development Milestone Release |
| [`release-7.1`](https://github.com/pingcap/docs/tree/release-7.1) | 7.1 LTS (Long-Term Support) version |
| [`release-7.0`](https://github.com/pingcap/docs/tree/release-7.0) | 7.0 Development Milestone Release |
| [`release-6.6`](https://github.com/pingcap/docs/tree/release-6.6) | 6.6 Development Milestone Release |
Expand Down
Loading

0 comments on commit 07d92df

Please sign in to comment.