Skip to content

Commit 7dcd74b

Browse files
committed
Change CI to MASTER_PULL to avoid conflicts with CI env variable in CI environments
1 parent e332a9c commit 7dcd74b

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

.github/workflows/pull-request.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
id: build
3737
continue-on-error: true
3838
run: |
39-
CI=false DOCUSAURUS_IGNORE_SSG_WARNINGS=true yarn build
39+
DOCS_PULL=false DOCUSAURUS_IGNORE_SSG_WARNINGS=true yarn build
4040
echo "exit_code=$?" >> $GITHUB_OUTPUT
4141
4242
- name: Check for validation failures

scripts/copy-clickhouse-repo-docs.sh

+3-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ function parse_args() {
1111
echo ""
1212
echo "Options:"
1313
echo " -l Path to a local copy of the ClickHouse repository."
14-
echo " -f Force pull from GitHub even in CI environment."
1514
echo " -h Display this help message."
1615
exit 0
1716
;;
1817
l)
1918
local_path="$OPTARG"
2019
;;
21-
f)
22-
force_pull=true
23-
;;
2420
\?)
2521
echo "Invalid option: -$OPTARG" >&2
2622
exit 1
@@ -103,14 +99,11 @@ main() {
10399

104100
if [[ -z "$local_path" ]]; then
105101

106-
# Check if in CI environment and force_pull is not set
107-
if [[ "$CI" == "true" && "$force_pull" == "false" ]]; then
108-
echo "CI environment detected, expecting /ClickHouse without having to pull the repo"
102+
# Check if override is set
103+
if [[ "$MASTER_PULL" == "false" ]]; then
104+
echo "expecting /ClickHouse folder to be present without having to pull it from the repo"
109105
copy_docs_locally "/ClickHouse"
110106
else
111-
if [[ "$force_pull" == "true" && "$CI" == "true" ]]; then
112-
echo "Force pull enabled, ignoring CI environment and pulling from GitHub"
113-
fi
114107
git clone --depth 1 --branch master https://github.com/ClickHouse/ClickHouse
115108
# Copy docs from cloned repository
116109
copy_docs_locally "$(pwd)/ClickHouse"

0 commit comments

Comments
 (0)