check yarn docusaurus (#1604)

Co-authored-by: kubevela-bot <kubevela.bot@aliyun.com>
This commit is contained in:
woshicai
2021-05-07 14:24:29 +08:00
committed by GitHub
co-authored by kubevela-bot
parent c9d21e6707
commit 18bf1189a3
3 changed files with 37 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash -l
#
# Copyright 2021. The KubeVela Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e
checkDocusaurus(){
if [ --d $1 ]; then
echo "generate docs failed"
exit 1;
else
count=`ls $1 | wc -w`
if [ "$count" > "0" ]; then
echo "generate docs failed"
fi
fi
}
+4
View File
@@ -17,6 +17,8 @@
set -e
source hack/website/helpers.sh
if [[ -n "$SSH_DEPLOY_KEY" ]]
then
mkdir -p ~/.ssh
@@ -76,6 +78,7 @@ then
yarn run docusaurus docs:version $version
git checkout docusaurus.config.js
rm docusaurus.config.js.bak
checkDocusaurus versioned_docs/version-${version}
fi
# Check for release branch update only
@@ -107,6 +110,7 @@ then
yarn run docusaurus docs:version $version
git checkout docusaurus.config.js
rm docusaurus.config.js.bak
checkDocusaurus versioned_docs/version-${version}
fi
+3
View File
@@ -17,6 +17,8 @@
set -e
source hack/website/helpers.sh
docs_path="./docs"
git clone --single-branch --depth 1 https://github.com/oam-dev/kubevela.io.git git-page
@@ -75,4 +77,5 @@ then
fi
yarn run docusaurus docs:version $version
checkDocusaurus versioned_docs/version-${version}
fi