mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
952d546a7c
CI=true is not pushed from github actions inside container, so it can use some fancy console output formats which may accidentally suppress the docusaurus output, makind the real error not visible in CI report (see https://github.com/ClickHouse/ClickHouse/pull/41254#issuecomment-1259275622 )
33 lines
689 B
Bash
Executable File
33 lines
689 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
GIT_BRANCH=$(git branch --show-current)
|
|
|
|
if [ "$GIT_DOCS_BRANCH" ] && ! [ "$GIT_DOCS_BRANCH" == "$GIT_BRANCH" ]; then
|
|
git fetch origin --depth=1 -- "$GIT_DOCS_BRANCH:$GIT_DOCS_BRANCH"
|
|
git checkout "$GIT_DOCS_BRANCH"
|
|
else
|
|
# Update docs repo
|
|
git pull
|
|
fi
|
|
|
|
# The repo is usually mounted to /ClickHouse
|
|
|
|
for lang in en ru zh
|
|
do
|
|
if [ -d "/ClickHouse/docs/${lang}" ]; then
|
|
cp -rf "/ClickHouse/docs/${lang}" "/opt/clickhouse-docs/docs/"
|
|
fi
|
|
done
|
|
|
|
# Force build error on wrong symlinks
|
|
sed -i '/onBrokenMarkdownLinks:/ s/ignore/error/g' docusaurus.config.js
|
|
|
|
if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
|
|
export CI=true
|
|
exec yarn build "$@"
|
|
fi
|
|
|
|
exec "$@"
|