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 78bf09f161584d17aacdeb16bd95737edbb80396
Author: Xiang Fu <xiangfu.1...@gmail.com>
AuthorDate: Fri Apr 23 16:28:50 2021 -0700

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

diff --git a/.github/workflows/scripts/publish-site.sh 
b/.github/workflows/scripts/publish-site.sh
new file mode 100755
index 0000000..c5d6eb0
--- /dev/null
+++ b/.github/workflows/scripts/publish-site.sh
@@ -0,0 +1,60 @@
+#!/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 "d...@pinot.apache.org"
+git commit -m "Update Pinot Site"
+git log -2
+git push origin asf-site

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to