Skip to content

Commit

Permalink
Docs: fix bug for building documentation site (#4310)
Browse files Browse the repository at this point in the history
Signed-off-by: Carson Yang <[email protected]>
  • Loading branch information
yangchuansheng authored Nov 16, 2023
1 parent 195165f commit a3412cd
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 24 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/deploy-docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: recursive # Fetch submodules
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Copy Files and Directories
run: |
mkdir -p ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-docs/
cp -r docs/4.0/i18n/zh-Hans/ ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-docs/current/
cp docs/4.0/i18n/zh-Hans/current.json ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
cp docs/4.0/code.json ${{ env.BUILD_PATH }}/i18n/zh-Hans/code.json
mkdir -p ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-blog/
cp -r blog/zh-Hans/ ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-blog
cp blog/zh-Hans/options.json ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-blog/options.json

- name: Detect package manager
id: detect-package-manager
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/deploy-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Copy Files and Directories
run: |
mkdir -p ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-docs/
cp -r docs/4.0/i18n/zh-Hans/ ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-docs/current/
cp docs/4.0/i18n/zh-Hans/current.json ${{ env.BUILD_PATH }}/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
cp docs/4.0/code.json ${{ env.BUILD_PATH }}/i18n/zh-Hans/code.json

- name: Detect package manager
id: detect-package-manager
Expand Down
2 changes: 1 addition & 1 deletion docs/blog/zh-Hans/2023/11/10/velero的使用.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors: [xiao-jay]
tags: [kubernetes,sealos]
---

## velero的使用111
## velero的使用

文档:https://velero.io/

Expand Down
7 changes: 0 additions & 7 deletions docs/website/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ WORKDIR /app

COPY . /app

RUN mkdir website/i18n/zh-Hans/docusaurus-plugin-content-docs/; \
cp -r 4.0/i18n/zh-Hans/ website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/; \
cp 4.0/i18n/zh-Hans/current.json website/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json; \
cp 4.0/code.json website/i18n/zh-Hans/code.json; \
mkdir website/i18n/zh-Hans/docusaurus-plugin-content-blog/; \
cp -r blog/zh-Hans/ website/i18n/zh-Hans/docusaurus-plugin-content-blog; \
cp blog/zh-Hans/options.json website/i18n/zh-Hans/docusaurus-plugin-content-blog/options.json
WORKDIR /app/website

RUN yarn install
Expand Down
2 changes: 1 addition & 1 deletion docs/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"sync-zh-files": "mkdir -p i18n/zh-Hans/docusaurus-plugin-content-docs && cp -r ../4.0/i18n/zh-Hans/ i18n/zh-Hans/docusaurus-plugin-content-docs/current/ && cp ../4.0/i18n/zh-Hans/current.json i18n/zh-Hans/docusaurus-plugin-content-docs/current.json && cp ../4.0/code.json i18n/zh-Hans/code.json && mkdir -p i18n/zh-Hans/docusaurus-plugin-content-blog && cp -r ../blog/zh-Hans/ i18n/zh-Hans/docusaurus-plugin-content-blog && cp ../blog/zh-Hans/options.json i18n/zh-Hans/docusaurus-plugin-content-blog/options.json",
"sync-zh-files": "mkdir -p i18n/zh-Hans/docusaurus-plugin-content-docs && cp -r ../4.0/i18n/zh-Hans i18n/zh-Hans/docusaurus-plugin-content-docs/current && cp ../4.0/i18n/zh-Hans/current.json i18n/zh-Hans/docusaurus-plugin-content-docs/current.json && cp ../4.0/code.json i18n/zh-Hans/code.json && mkdir -p i18n/zh-Hans/docusaurus-plugin-content-blog && cp -r ../blog/zh-Hans/* i18n/zh-Hans/docusaurus-plugin-content-blog/ && cp ../blog/zh-Hans/options.json i18n/zh-Hans/docusaurus-plugin-content-blog/options.json",
"docusaurus": "docusaurus",
"start": "yarn sync-zh-files && tsc && docusaurus start",
"start-zh": "yarn sync-zh-files && tsc && docusaurus start --locale zh-Hans",
Expand Down

0 comments on commit a3412cd

Please sign in to comment.