Try alternative website deploy destination

This commit is contained in:
Ivan Blinkov 2020-01-28 21:51:44 +03:00
parent cbb3b492f2
commit 2ff8f7de1a
2 changed files with 13 additions and 1 deletions

View File

@ -3,6 +3,7 @@ set -ex
BASE_DIR=$(dirname $(readlink -f $0))
BUILD_DIR="${BASE_DIR}/../build"
PUBLISH_DIR="${BASE_DIR}/../publish"
IMAGE="clickhouse/website"
if [[ -z "$1" ]]
then
@ -17,6 +18,17 @@ if [[ -z "$1" ]]
then
source "${BASE_DIR}/venv/bin/activate"
python "${BASE_DIR}/build.py" "--enable-stable-releases"
set +x
rm -rf "${PUBLISH_DIR}" || true
git clone git@github.com:ClickHouse/clickhouse.github.io.git "${PUBLISH_DIR}"
cd "${PUBLISH_DIR}"
git rm -rf *
git commit -a -m "wipe old release"
cp -R "${BUILD_DIR}"/* .
git add *
git commit -a -m "add new release at $(date)"
git push origin master
set -x
cd "${BUILD_DIR}"
docker build -t "${FULL_NAME}" "${BUILD_DIR}"
docker tag "${FULL_NAME}" "${REMOTE_NAME}"

View File

@ -567,7 +567,7 @@ sudo clickhouse-client-$LATEST_VERSION/install/doinst.sh
});
var hostParts = window.location.host.split('.');
if (hostParts.length > 2 && hostParts[0] != 'test') {
if (hostParts.length > 2 && hostParts[0] != 'test' && hostParts[1] != 'github') {
window.location.host = hostParts[0] + '.' + hostParts[1];
}