[fix](docs) update build-extension.yml (#19528)

Co-authored-by: wangyf0555 <wangyongfeng@flywheels.com>
This commit is contained in:
wangyongfeng
2023-05-11 14:38:04 +08:00
committed by GitHub
parent 0b25376cf8
commit 3edde1fa4a

View File

@ -99,30 +99,23 @@ jobs:
- name: Build
run: |
git clone https://github.com/apache/doris-website.git website
rm -rf website/docs
cp -R docs/en/docs website/
rm -rf website/community
cp -R docs/en/community website/
rm -rf website/i18n/zh-CN/docusaurus-plugin-content-docs/*
mkdir website/i18n/zh-CN/docusaurus-plugin-content-docs/current
cp -R docs/zh-CN/docs/* website/i18n/zh-CN/docusaurus-plugin-content-docs/current/
cp docs/dev.json website/i18n/zh-CN/docusaurus-plugin-content-docs/current.json
rm -rf website/i18n/zh-CN/docusaurus-plugin-content-docs-community/*
mkdir website/i18n/zh-CN/docusaurus-plugin-content-docs-community/current
cp -R docs/zh-CN/community/* website/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/
cp -R docs/sidebarsCommunity.json website/
cp -R docs/sidebars.json website/
cp -R docs/images website/static/
sed '2,3d' website/versions.json > website/versions.json1
rm -rf website/versions.json
mv website/versions.json1 website/versions.json
sed '123,131d' website/docusaurus.config.js > website/docusaurus.config.js1
rm -rf website/docusaurus.config.js
mv website/docusaurus.config.js1 website/docusaurus.config.js
cd website
npm install -g npm@8.19.1
mkdir -p docs
cp -R ../docs/en/docs/* docs/
cp -R ../docs/sidebars.json sidebars.json
mkdir -p i18n/zh-CN/docusaurus-plugin-content-docs/current
cp -R ../docs/zh-CN/docs/* i18n/zh-CN/docusaurus-plugin-content-docs/current/
cp -R ../docs/dev.json i18n/zh-CN/docusaurus-plugin-content-docs/current.json
mkdir -p community
cp -R ../docs/en/community/* community/
mkdir -p i18n/zh-CN/docusaurus-plugin-content-docs-community/current/
cp -R ../docs/zh-CN/community/* i18n/zh-CN/docusaurus-plugin-content-docs-community/current/
cp -R ../docs/sidebarsCommunity.json .
cp -R ../docs/images static/
npm install -g yarn
yarn cache clean
yarn && yarn build
yarn && yarn build
cd ../
rm -rf website
rm -rf website