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

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


The following commit(s) were added to refs/heads/master by this push:
     new b2dc767  simplify the logic
b2dc767 is described below

commit b2dc767e669230c89a7bf9c505df7378d88c4230
Author: Weiwei Yang <[email protected]>
AuthorDate: Thu Jul 16 03:39:34 2020 -0700

    simplify the logic
---
 .github/workflows/auto-publish.yml | 18 ++++++------------
 Dockerfile                         | 12 ++++++------
 2 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/.github/workflows/auto-publish.yml 
b/.github/workflows/auto-publish.yml
index ae0725c..1c125cc 100644
--- a/.github/workflows/auto-publish.yml
+++ b/.github/workflows/auto-publish.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-name: "yunikorn website auto-publish"
+name: "auto-publish"
 
 on:
   push:
@@ -32,16 +32,8 @@ jobs:
         working-directory: './yunikorn-master'
         run: |
           docker build -t yunikorn/yunikorn-website:1.0.0 .
-          docker run -d -p 4000:4000 -v $PWD/yunikorn-site:/yunikorn-site 
yunikorn/yunikorn-website:1.0.0
-      - name: "Wait until the local website server populates static pages"
-        working-directory: './yunikorn-master'
-        run: |
-          bash -c 'while true; do curl -Is http://localhost:4000 | head -n 1 | 
grep "OK"; [ $? -eq 0 ] && break; sleep 3; done'
-          echo "backup generated files"
-          mkdir /tmp/site-backup
-          cp -R yunikorn-site/* /tmp/site-backup
-          ls -al /tmp/site-backup/*
-        shell: bash
+          docker run --name yunikorn-site -d -p 3000:3000 
yunikorn/yunikorn-website:1.0.0
+          bash -c 'while true; do curl -Is http://localhost:3000 | head -n 1 | 
grep "OK"; [ $? -eq 0 ] && break; sleep 3; done'
         timeout-minutes: 5
       - name: "Checkout asf-site branch"
         uses: actions/checkout@v2
@@ -51,9 +43,11 @@ jobs:
       - name: "Commit changes"
         working-directory: './yunikorn-asf-site'
         run: |
+          mkdir /tmp/site-backup
+          docker cp yunikorn-site:/incubator-yunikorn-site/build 
/tmp/site-backup/
           echo "wipe out the content (except files starting with dot)"
           rm -rf ./*
-          cp -R /tmp/site-backup/* .
+          cp -R /tmp/site-backup/build/* .
           git config --local user.email "[email protected]"
           git config --local user.name "yunikorn-bot"
           git add .
diff --git a/Dockerfile b/Dockerfile
index e9ee1f9..be644a4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,11 +13,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ubuntu:18.04
-RUN apt-get update
-RUN apt-get install -y wget vim git python-pip zlib1g-dev libssl-dev
-RUN apt-get update
-RUN apt-get -y install bundler
+FROM node:12.18.0
+
 ADD . /incubator-yunikorn-site
 WORKDIR /incubator-yunikorn-site
-ENTRYPOINT bundle update && bundle exec jekyll serve --destination 
/yunikorn-site/ --watch --host=0.0.0.0
\ No newline at end of file
+
+RUN yarn install
+RUN yarn build
+ENTRYPOINT yarn start --host 0.0.0.0
\ No newline at end of file

Reply via email to