Skip to content

Commit d344a0b

Browse files
authored
Fix document upload after #138. (#154)
The documents are generated inside a docker image, in a previous change (#138), the path for the generated docs was changed. This script should have been changed at the same time. While testing I found out that there was another tiny problem, the documents were never uploaded because the change detection was broken. Fix that too <blush>.
1 parent 48c92af commit d344a0b

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ cmake-build-*/
1313
# The Doxygen-generated documentation goes here:
1414
bigtable/doc/html/
1515
doc/html/
16+
17+
# This is a staging directory used to upload the documents to gihub.io
18+
github-io-staging/

ci/upload-docs.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,23 @@ fi
3535
# is to create a branch (gh-pages) and post the documentation in that branch.
3636
# We first do some general git configuration:
3737

38-
# Clone the gh-pages branch into the doc/html subdirectory.
38+
# Clone the gh-pages branch into a staging directory.
3939
readonly REPO_URL=$(git config remote.origin.url)
40-
git clone -b gh-pages "${REPO_URL}" doc/html
40+
git clone -b gh-pages "${REPO_URL}" github-io-staging
4141

4242
# Remove any previous content of the branch. We will recover any unmodified
4343
# files in a second.
44-
(cd doc/html && git rm -qfr --ignore-unmatch .)
44+
(cd github-io-staging && git rm -qfr --ignore-unmatch .)
4545

46-
# Copy the build results out of the Docker image.
47-
readonly IMAGE="cached-${DISTRO}-${DISTRO_VERSION}"
48-
sudo docker run --volume "$PWD/doc:/d" --rm -it "${IMAGE}:tip" cp -r /var/tmp/build/gccpp/bigtable/doc/html /d
46+
# Copy the build results into the gh-pages clone.
47+
cp -r bigtable/doc/html/. github-io-staging
4948

50-
cd doc/html
49+
cd github-io-staging
5150
git config user.name "Travis Build Robot"
5251
git config user.email "nobody@users.noreply.github.com"
5352
git add --all .
5453

55-
if git diff --exit-code; then
54+
if git diff --quiet HEAD; then
5655
echo "Skipping documentation upload as there are no differences to upload."
5756
exit 0
5857
fi

0 commit comments

Comments
 (0)