Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit c9ddd3b

Browse files
author
Pawel Karczewski
committed
[doc] Enable uploading documentation for local builds
1 parent 4b9a481 commit c9ddd3b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/docker/run-doc-update.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ REPO_NAME=${REPO:-"libpmemobj-cpp"}
2424
export GITHUB_TOKEN=${DOC_UPDATE_GITHUB_TOKEN} # export for hub command
2525
REPO_DIR=$(mktemp -d -t libpmemobjcpp-XXX)
2626
ARTIFACTS_DIR=$(mktemp -d -t ARTIFACTS-XXX)
27+
LOCAL_REPO=$(git rev-parse --show-toplevel)
2728

2829
# Only 'master' or 'stable-*' branches are valid; determine docs location dir on gh-pages branch
2930
TARGET_BRANCH=${CI_BRANCH}
@@ -46,16 +47,17 @@ UPSTREAM="https://github.com/${DOC_REPO_OWNER}/${REPO_NAME}"
4647

4748
pushd ${REPO_DIR}
4849
echo "Clone repo:"
49-
git clone ${ORIGIN} ${REPO_DIR}
50+
git clone --origin Local ${LOCAL_REPO} ${REPO_DIR}
5051
cd ${REPO_DIR}
52+
git remote add origin ${ORIGIN}
5153
git remote add upstream ${UPSTREAM}
5254

5355
git config --local user.name ${BOT_NAME}
5456
git config --local user.email "${BOT_NAME}@intel.com"
5557
hub config --global hub.protocol https
5658

5759
git remote update
58-
git checkout -B ${TARGET_BRANCH} upstream/${TARGET_BRANCH}
60+
git checkout -B ${TARGET_BRANCH} Local/${TARGET_BRANCH}
5961

6062
echo "Build docs:"
6163
mkdir -p ${REPO_DIR}/build

0 commit comments

Comments
 (0)