From ebc5a4cfb40ae53ccf98102b7932587c575dbfd4 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Tue, 10 Oct 2023 23:14:16 -0400 Subject: [PATCH 1/3] add verions 2.5 in English and Chinese Signed-off-by: DanRoscigno --- _IGNORE/testbuild | 13 +++++++++++-- docusaurus.config.js | 3 +++ versions.json | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/_IGNORE/testbuild b/_IGNORE/testbuild index 64217356e9..3da9075ee1 100755 --- a/_IGNORE/testbuild +++ b/_IGNORE/testbuild @@ -1,8 +1,8 @@ export ORGANIZATION_NAME=danroscigno -export PROJECT_NAME=docusaurusv3 +export PROJECT_NAME=doc export DEPLOYMENT_BRANCH=gh-pages -export WORKINGDIR=/Users/droscign/GitHub/Docusaurus/starrocks +export WORKINGDIR=/Users/droscign/GitHub/doc/ cd $WORKINGDIR mkdir -p temp-en @@ -22,6 +22,11 @@ rm -rf ${WORKINGDIR}/versioned_docs/version-3.0 mkdir -p ${WORKINGDIR}/versioned_docs/version-3.0 cp -r docs/* ${WORKINGDIR}/versioned_docs/version-3.0 +git checkout branch-2.5 +rm -rf ${WORKINGDIR}/versioned_docs/version-2.5 +mkdir -p ${WORKINGDIR}/versioned_docs/version-2.5 +cp -r docs/* ${WORKINGDIR}/versioned_docs/version-2.5 + cd ${WORKINGDIR}/temp-zh gh repo clone StarRocks/docs.zh-cn cd docs.zh-cn @@ -36,6 +41,10 @@ rm -rf ${WORKINGDIR}/i18n/zh/docusaurus-plugin-content-docs/version-3.0/ mkdir -p ${WORKINGDIR}/i18n/zh/docusaurus-plugin-content-docs/version-3.0 cp -r * ${WORKINGDIR}/i18n/zh/docusaurus-plugin-content-docs/version-3.0/ +git checkout 2.5 +rm -rf ${WORKINGDIR}/i18n/zh/docusaurus-plugin-content-docs/version-2.5/ +mkdir -p ${WORKINGDIR}/i18n/zh/docusaurus-plugin-content-docs/version-2.5 +cp -r * ${WORKINGDIR}/i18n/zh/docusaurus-plugin-content-docs/version-2.5/ echo "cleanup before running yarn build" cd ${WORKINGDIR} diff --git a/docusaurus.config.js b/docusaurus.config.js index 42601b3dc5..92d2c87483 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -64,6 +64,9 @@ const config = { '3.0': { banner: 'none' }, + '2.5': { + banner: 'none' + }, }, }, theme: { diff --git a/versions.json b/versions.json index 510a617768..8fd260b8c1 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ [ "3.1", - "3.0" + "3.0", + "2.5" ] From 363220ccbfabb4445ba5f8084995dfc3a0a7904e Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Tue, 10 Oct 2023 23:18:41 -0400 Subject: [PATCH 2/3] add verions 2.5 in English and Chinese Signed-off-by: DanRoscigno --- - | 116 ++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 16 +++++ .github/workflows/test-deploy.yml | 16 +++++ 3 files changed, 148 insertions(+) create mode 100644 - diff --git a/- b/- new file mode 100644 index 0000000000..7b7059fa62 --- /dev/null +++ b/- @@ -0,0 +1,116 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + # Review gh actions docs if you want to further define triggers, paths, etc + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + +permissions: + contents: write + + +jobs: + prod-deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - uses: actions/checkout@v3 + with: + repository: starrocks/starrocks + fetch-depth: 0 + path: ./temp-en + + - uses: actions/checkout@v3 + with: + repository: starrocks/docs.zh-cn + fetch-depth: 0 + path: ./temp-zh + + - name: process English 3.1 + run: | + cd /home/runner/work/doc/doc/temp-en + git checkout branch-3.1 + rm -rf ../versioned_docs/version-3.1 + mkdir -p ../versioned_docs/version-3.1 + cp -r docs/* ../versioned_docs/version-3.1 + + - name: process English 3.0 + run: | + cd /home/runner/work/doc/doc/temp-en + git checkout branch-3.0 + rm -rf ../versioned_docs/version-3.0 + mkdir -p ../versioned_docs/version-3.0 + cp -r docs/* ../versioned_docs/version-3.0 + + - name: process English 2.5 + run: | + cd /home/runner/work/doc/doc/temp-en + git checkout branch-2.5 + rm -rf ../versioned_docs/version-2.5 + mkdir -p ../versioned_docs/version-2.5 + cp -r docs/* ../versioned_docs/version-2.5 + + - name: process Chinese 3.1 + run: | + cd /home/runner/work/doc/doc/temp-zh + git checkout 3.1 + rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-3.1/ + mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-3.1 + cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-3.1/ + + - name: process Chinese 3.0 + run: | + cd /home/runner/work/doc/doc/temp-zh + git checkout 3.0 + rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-3.0/ + mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-3.0 + cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-3.0/ + + - name: process Chinese 2.5 + run: | + cd /home/runner/work/doc/doc/temp-zh + git checkout 2.5 + rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ + mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-2.5 + cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ + + - name: cleanup before running yarn build + run: | + cd /home/runner/work/doc/doc + rm -rf temp-en + rm -rf temp-zh + find . -type f -name TOC.md | xargs rm + rm i18n/zh/docusaurus-plugin-content-docs/*/README.md + rm versioned_docs/version-*/README.md + find . -type f -name "StarRocks_intro.md" -print0 -exec cp _IGNORE/_StarRocks_intro.mdx "{}" \; + + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build website + run: | + export NODE_OPTIONS="--max_old_space_size=8192" + yarn build + + # Popular action to deploy to GitHub Pages: + # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + # Build output to publish to the `gh-pages` branch: + publish_dir: ./build + # The following lines assign commit authorship to the official + # GH-Actions bot for deploys to `gh-pages` branch: + # https://github.com/actions/checkout/issues/13#issuecomment-724415212 + # The GH actions bot is used by default if you didn't specify the two fields. + # You can swap them out with your own user credentials. + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0884dfe7ad..7b7059fa62 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,6 +50,14 @@ jobs: mkdir -p ../versioned_docs/version-3.0 cp -r docs/* ../versioned_docs/version-3.0 + - name: process English 2.5 + run: | + cd /home/runner/work/doc/doc/temp-en + git checkout branch-2.5 + rm -rf ../versioned_docs/version-2.5 + mkdir -p ../versioned_docs/version-2.5 + cp -r docs/* ../versioned_docs/version-2.5 + - name: process Chinese 3.1 run: | cd /home/runner/work/doc/doc/temp-zh @@ -66,6 +74,14 @@ jobs: mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-3.0 cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-3.0/ + - name: process Chinese 2.5 + run: | + cd /home/runner/work/doc/doc/temp-zh + git checkout 2.5 + rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ + mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-2.5 + cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ + - name: cleanup before running yarn build run: | cd /home/runner/work/doc/doc diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 679a490c03..b2fe1607fd 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -45,6 +45,14 @@ jobs: mkdir -p ../versioned_docs/version-3.0 cp -r docs/* ../versioned_docs/version-3.0 + - name: process English 2.5 + run: | + cd /home/runner/work/doc/doc/temp-en + git checkout branch-2.5 + rm -rf ../versioned_docs/version-2.5 + mkdir -p ../versioned_docs/version-2.5 + cp -r docs/* ../versioned_docs/version-2.5 + - name: process Chinese 3.1 run: | cd /home/runner/work/doc/doc/temp-zh @@ -61,6 +69,14 @@ jobs: mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-3.0 cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-3.0/ + - name: process Chinese 2.5 + run: | + cd /home/runner/work/doc/doc/temp-zh + git checkout 2.5 + rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ + mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-2.5 + cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ + - name: cleanup before running yarn build run: | cd /home/runner/work/doc/doc From 8ac0e2b9219b038eea1055a1119fbf7e8ecb7a8a Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Tue, 10 Oct 2023 23:21:39 -0400 Subject: [PATCH 3/3] typo --- - | 116 -------------------------------------------------------------- 1 file changed, 116 deletions(-) delete mode 100644 - diff --git a/- b/- deleted file mode 100644 index 7b7059fa62..0000000000 --- a/- +++ /dev/null @@ -1,116 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: - - main - # Review gh actions docs if you want to further define triggers, paths, etc - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on - -permissions: - contents: write - - -jobs: - prod-deploy: - name: Deploy to GitHub Pages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - uses: actions/checkout@v3 - with: - repository: starrocks/starrocks - fetch-depth: 0 - path: ./temp-en - - - uses: actions/checkout@v3 - with: - repository: starrocks/docs.zh-cn - fetch-depth: 0 - path: ./temp-zh - - - name: process English 3.1 - run: | - cd /home/runner/work/doc/doc/temp-en - git checkout branch-3.1 - rm -rf ../versioned_docs/version-3.1 - mkdir -p ../versioned_docs/version-3.1 - cp -r docs/* ../versioned_docs/version-3.1 - - - name: process English 3.0 - run: | - cd /home/runner/work/doc/doc/temp-en - git checkout branch-3.0 - rm -rf ../versioned_docs/version-3.0 - mkdir -p ../versioned_docs/version-3.0 - cp -r docs/* ../versioned_docs/version-3.0 - - - name: process English 2.5 - run: | - cd /home/runner/work/doc/doc/temp-en - git checkout branch-2.5 - rm -rf ../versioned_docs/version-2.5 - mkdir -p ../versioned_docs/version-2.5 - cp -r docs/* ../versioned_docs/version-2.5 - - - name: process Chinese 3.1 - run: | - cd /home/runner/work/doc/doc/temp-zh - git checkout 3.1 - rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-3.1/ - mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-3.1 - cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-3.1/ - - - name: process Chinese 3.0 - run: | - cd /home/runner/work/doc/doc/temp-zh - git checkout 3.0 - rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-3.0/ - mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-3.0 - cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-3.0/ - - - name: process Chinese 2.5 - run: | - cd /home/runner/work/doc/doc/temp-zh - git checkout 2.5 - rm -rf ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ - mkdir -p ../i18n/zh/docusaurus-plugin-content-docs/version-2.5 - cp -r * ../i18n/zh/docusaurus-plugin-content-docs/version-2.5/ - - - name: cleanup before running yarn build - run: | - cd /home/runner/work/doc/doc - rm -rf temp-en - rm -rf temp-zh - find . -type f -name TOC.md | xargs rm - rm i18n/zh/docusaurus-plugin-content-docs/*/README.md - rm versioned_docs/version-*/README.md - find . -type f -name "StarRocks_intro.md" -print0 -exec cp _IGNORE/_StarRocks_intro.mdx "{}" \; - - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Build website - run: | - export NODE_OPTIONS="--max_old_space_size=8192" - yarn build - - # Popular action to deploy to GitHub Pages: - # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - # Build output to publish to the `gh-pages` branch: - publish_dir: ./build - # The following lines assign commit authorship to the official - # GH-Actions bot for deploys to `gh-pages` branch: - # https://github.com/actions/checkout/issues/13#issuecomment-724415212 - # The GH actions bot is used by default if you didn't specify the two fields. - # You can swap them out with your own user credentials. - user_name: github-actions[bot] - user_email: 41898282+github-actions[bot]@users.noreply.github.com