Skip to content
Open
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
40 changes: 40 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,25 @@ jobs:
fi
}

sync_tidb_cloud_filesystem() {
local source_root="$1"
local target_root="./markdown-pages/en/tidb-cloud-filesystem/master"

mkdir -p "${target_root}"
rm -rf "${target_root}/tidb-cloud-filesystem"
rm -f "${target_root}/TOC-tidb-cloud-filesystem.md"

if [ -d "${source_root}/tidb-cloud-filesystem" ]
then
mv "${source_root}/tidb-cloud-filesystem" "${target_root}/"
fi

if [ -f "${source_root}/TOC-tidb-cloud-filesystem.md" ]
then
mv "${source_root}/TOC-tidb-cloud-filesystem.md" "${target_root}/"
fi
}

# handle zh auto translated docs branch(only cloud)
if [ ${{ inputs.repo }} = "pingcap/docs" ] && [ ${{ inputs.branch }} = ${{ env.ZH_CLOUD_BRANCH }} ]
then
Expand All @@ -99,6 +118,7 @@ jobs:
yarn download:tidb-cloud:en --ref ${{ inputs.branch }}
yarn download ${{ inputs.repo }} --ref ${{ inputs.branch }}
sync_tidb_cloud_lake "en" "./markdown-pages/en/tidb/${{ inputs.branch }}"
sync_tidb_cloud_filesystem "./markdown-pages/en/tidb/${{ inputs.branch }}"
exit 0
fi

Expand Down Expand Up @@ -137,9 +157,29 @@ jobs:
fi
}

sync_tidb_cloud_filesystem() {
local source_root="$1"
local target_root="./markdown-pages/en/tidb-cloud-filesystem/master"

mkdir -p "${target_root}"
rm -rf "${target_root}/tidb-cloud-filesystem"
rm -f "${target_root}/TOC-tidb-cloud-filesystem.md"

if [ -d "${source_root}/tidb-cloud-filesystem" ]
then
mv "${source_root}/tidb-cloud-filesystem" "${target_root}/"
fi

if [ -f "${source_root}/TOC-tidb-cloud-filesystem.md" ]
then
mv "${source_root}/TOC-tidb-cloud-filesystem.md" "${target_root}/"
fi
}

sudo rm -fr ./markdown-pages/*
yarn download:tidb:en:all
sync_tidb_cloud_lake "en" "./markdown-pages/en/tidb/${{ env.EN_CLOUD_BRANCH }}"
sync_tidb_cloud_filesystem "./markdown-pages/en/tidb/${{ env.EN_CLOUD_BRANCH }}"
yarn download:tidb-cloud:en
yarn download:tidb:zh:all
sync_tidb_cloud_lake "zh" "./markdown-pages/zh/tidb/release-8.5"
Expand Down
17 changes: 17 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,23 @@
"versions": ["master"]
}
}
},
"tidb-cloud-filesystem": {
"target": "release-8.5",
"languages": {
"en": {
"repo": "pingcap/docs",
"versions": ["master"]
},
"zh": {
"repo": "pingcap/docs",
"versions": ["master"]
},
"ja": {
"repo": "pingcap/docs",
"versions": ["master"]
}
}
}
},
"redirect": {
Expand Down