This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-pinot-site.git

commit 8cd6518f49d60dcaf5b14135e4df1d3c1b40157c
Author: Xiang Fu <[email protected]>
AuthorDate: Fri Apr 23 16:28:50 2021 -0700

    adding publish-site script
---
 .github/workflows/scripts/publish-site.sh | 58 +++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/.github/workflows/scripts/publish-site.sh 
b/.github/workflows/scripts/publish-site.sh
new file mode 100755
index 0000000..3fd38fb
--- /dev/null
+++ b/.github/workflows/scripts/publish-site.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -x -e
+ls -lrth
+ROOT_DIR=$(git rev-parse --show-toplevel)
+SITE_DIR=${ROOT_DIR}/content
+git branch
+
+# ORIGIN_REPO=$(git remote show origin | grep 'Push  URL' | awk -F// '{print 
$NF}')
+ORIGIN_REPO="https://github.com/apache/incubator-pinot-site";
+echo "ORIGIN_REPO: $ORIGIN_REPO"
+
+DEV_TMP=/tmp/pinot-site-dev
+(
+  rm -rf $DEV_TMP
+  mkdir $DEV_TMP
+  cd $DEV_TMP
+
+  git clone "$ORIGIN_REPO" .
+  git checkout dev
+  cd ${DEV_TMP}/website
+  npm install yarn
+  yarn install
+  yarn run build
+)
+cd ${ROOT_DIR}
+
+git status
+
+rm -rf ${SITE_DIR}
+## copy generated site
+mv ${DEV_TMP}/website/build ${SITE_DIR}
+
+git status
+git add .
+git status
+
+git config user.name "Pinot Site Updater"
+git config user.email "[email protected]"
+git commit -m "Update Pinot Site"

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to