You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2021/04/23 23:15:16 UTC
[incubator-pinot-site] branch dev updated (f241586 -> e4b1c64)
This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-pinot-site.git.
discard f241586 adding github action to publish website
new e4b1c64 adding github action to publish website
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (f241586)
\
N -- N -- N refs/heads/dev (e4b1c64)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
website/scripts/publish-site.sh | 1 +
1 file changed, 1 insertion(+)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[incubator-pinot-site] 01/01: adding github action to publish
website
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-pinot-site.git
commit e4b1c642063c05db7cc936ec5c0ca323e75efc2d
Author: Xiang Fu <xi...@gmail.com>
AuthorDate: Fri Apr 23 15:28:28 2021 -0700
adding github action to publish website
---
.../workflows/website-publish.yml | 30 ++++++------
website/scripts/build-site.sh | 8 +---
.../scripts/{publish_site.sh => publish-site.sh} | 54 ++++++++++++----------
3 files changed, 45 insertions(+), 47 deletions(-)
diff --git a/website/scripts/build-site.sh b/.github/workflows/website-publish.yml
old mode 100755
new mode 100644
similarity index 76%
copy from website/scripts/build-site.sh
copy to .github/workflows/website-publish.yml
index 83842d2..4537575
--- a/website/scripts/build-site.sh
+++ b/.github/workflows/website-publish.yml
@@ -1,4 +1,3 @@
-#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -18,19 +17,16 @@
# under the License.
#
-ROOT_DIR=$(git rev-parse --show-toplevel)
-
-VERSION=0.30
-
-set -x -e
-
-cd ${ROOT_DIR}/website
-npm install yarn
-yarn install
-yarn run build
-
-rm -rf ${ROOT_DIR}/content
-
-## copy generated site
-cp -R build/ ${ROOT_DIR}/content/
-
+name: Publish Website
+on:
+ push:
+ branches:
+ - dev
+jobs:
+ publish-website:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Website build
+ run: |
+ website/scripts/publish-site.sh
diff --git a/website/scripts/build-site.sh b/website/scripts/build-site.sh
index 83842d2..9943e0b 100755
--- a/website/scripts/build-site.sh
+++ b/website/scripts/build-site.sh
@@ -19,18 +19,14 @@
#
ROOT_DIR=$(git rev-parse --show-toplevel)
-
-VERSION=0.30
-
set -x -e
-
cd ${ROOT_DIR}/website
npm install yarn
yarn install
yarn run build
rm -rf ${ROOT_DIR}/content
-
## copy generated site
-cp -R build/ ${ROOT_DIR}/content/
+mv build ${ROOT_DIR}/content
+cd ${ROOT_DIR}
\ No newline at end of file
diff --git a/website/scripts/publish_site.sh b/website/scripts/publish-site.sh
old mode 100644
new mode 100755
similarity index 67%
rename from website/scripts/publish_site.sh
rename to website/scripts/publish-site.sh
index 9b3a87c..25cc5e3
--- a/website/scripts/publish_site.sh
+++ b/website/scripts/publish-site.sh
@@ -18,34 +18,40 @@
# under the License.
#
-set -e
-
+set -x -e
+ls -lrth
ROOT_DIR=$(git rev-parse --show-toplevel)
-WORK_DIR=${ROOT_DIR}/build
-ME=`basename $0`
-echo "Basename $ME"
+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"
-SITE_TMP=/tmp/pinot-site
+DEV_TMP=/tmp/pinot-site-dev
(
-
- cd $ROOT_DIR
- rm -rf $SITE_TMP
- mkdir $SITE_TMP
- cd $SITE_TMP
-
- git clone "https://$GH_TOKEN@$ORIGIN_REPO" .
- git config user.name "Pinot Site Updater"
- git config user.email "dev@pinot.apache.org"
- git checkout asf-master
-
- # Clean content directory
- rm -rf $SITE_TMP/content/
- mkdir $SITE_TMP/content
-
- # Copy the generated directory to asf folder
- cp -r $WORK_DIR/* $SITE_TMP/content
-)
\ No newline at end of file
+ rm -rf $DEV_TMP
+ mkdir $DEV_TMP
+ cd $DEV_TMP
+
+ git clone "$ORIGIN_REPO" .
+ cd ${DEV_TMP}/website
+ npm install yarn
+ yarn install
+ yarn run build
+)
+cd ${ROOT_DIR}
+
+git status
+git pull
+git checkout origin asf-site
+
+rm -rf ${SITE_DIR}
+## copy generated site
+mv ${DEV_TMP}/website/build ${SITE_DIR}
+
+git status
+git add .
+git status
+git commit -m "Update Pinot Site"
+ls -lrth
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org