From 0404f1c0b5aef433dba012166ebe48ca2c36ded8 Mon Sep 17 00:00:00 2001 From: ImeevOchir Date: Wed, 6 Jul 2022 07:56:10 +0300 Subject: [PATCH] Copy build artifacts to S3 Add toctree to allow navigation Resolves #5 --- source/toctree.rst | 14 ++++++++++++++ upload_output.sh | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 source/toctree.rst create mode 100755 upload_output.sh diff --git a/source/toctree.rst b/source/toctree.rst new file mode 100644 index 0000000..ba93ec1 --- /dev/null +++ b/source/toctree.rst @@ -0,0 +1,14 @@ +:orphan: + +.. toctree:: + :caption: Contents: + :maxdepth: 2 + :includehidden: + + fiber + replication + relay + qsync + wal + wal-fmt + allocators diff --git a/upload_output.sh b/upload_output.sh new file mode 100755 index 0000000..57472f8 --- /dev/null +++ b/upload_output.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + + +BRANCH=$BRANCH_NAME +DOC_DEST="$S3_UPLOAD_PATH/internals/${BRANCH_NAME}" +CHECK_KEY="doc-builds/internals/${BRANCH_NAME}/json/_build_ru/json/toctree.fjson" + +aws s3api head-object --bucket ${S3_BUCKET} --key ${CHECK_KEY} --endpoint-url="$ENDPOINT_URL" || not_exist=true +if [ $not_exist ]; then + echo "toctree.json does not exist" +else + echo "found toctree.json, remove the branch from s3 location" + aws s3 rm "$DOC_DEST"/json --endpoint-url="$ENDPOINT_URL" --recursive +fi + +aws s3 cp build/json "$DOC_DEST"/json --endpoint-url="$ENDPOINT_URL" --recursive --include "*" --exclude "*.jpg" --exclude "*.png" --exclude "*.svg"