mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 04:26:39 +00:00
check yarn docusaurus (#1604)
Co-authored-by: kubevela-bot <kubevela.bot@aliyun.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user