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

nicoloboschi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new e937ae9a6 [website] Make site3 the official website (deploy scripts - 
master) (#3187)
e937ae9a6 is described below

commit e937ae9a6838fd533c3973d6ae6c32d98b6619bd
Author: Nicolò Boschi <[email protected]>
AuthorDate: Thu Apr 14 11:49:57 2022 +0200

    [website] Make site3 the official website (deploy scripts - master) (#3187)
    
    * [website] Make site3 the official website
    
    * fix action
---
 .github/workflows/website-deploy.yaml         | 31 +++++++-------
 .github/workflows/website-pr-validation.yml   | 20 +--------
 .github/workflows/website-staging-deploy.yaml | 62 ---------------------------
 site3/website/scripts/publish-website.sh      |  4 +-
 4 files changed, 18 insertions(+), 99 deletions(-)

diff --git a/.github/workflows/website-deploy.yaml 
b/.github/workflows/website-deploy.yaml
index d97e4c86d..6506550c7 100644
--- a/.github/workflows/website-deploy.yaml
+++ b/.github/workflows/website-deploy.yaml
@@ -24,11 +24,15 @@ on:
     branches:
       - master
     paths:
-      - 'site/**'
+      - 'site3/**'
       - '.github/workflows/website-deploy.yaml'
+
+env:
+  DEPLOY_URL: "https://bookkeeper.apache.org/";
+
 jobs:
   build-website:
-    name: Build and publish website
+    name: Build and deploy the website
     if: ${{ github.repository == 'apache/bookkeeper' }}
     runs-on: ubuntu-latest
     timeout-minutes: 180
@@ -42,22 +46,17 @@ jobs:
           distribution: 'temurin'
           java-version: 11
 
-          
-      - name: Set up Ruby
-        uses: ruby/setup-ruby@v1
+      - name: Setup NodeJS
+        uses: actions/setup-node@v2
         with:
-          ruby-version: 2.6.9
+          node-version: '14'
+
+      - name: Setup yarn
+        run: npm install -g yarn
 
-      - name: publish
+      - name: Publish
         env:
           GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
         run: |
-          #!/bin/bash
-          set -e
-          sudo apt-get update
-          sudo apt-get install -y libxslt-dev libxml2-dev
-          cd site
-          make setup
-          make latest_javadoc
-          make apache
-          ./scripts/publish-website.sh
+          ./site3/website/scripts/build-website.sh
+          ./site3/website/scripts/publish-website.sh
\ No newline at end of file
diff --git a/.github/workflows/website-pr-validation.yml 
b/.github/workflows/website-pr-validation.yml
index 9438d9911..1f19cfcc3 100644
--- a/.github/workflows/website-pr-validation.yml
+++ b/.github/workflows/website-pr-validation.yml
@@ -25,7 +25,6 @@ on:
       - master
       - branch-*
     paths:
-      - 'site/**'
       - 'site3/**'
       - '.github/workflows/website-pr-validation.yaml'
     workflow_dispatch:
@@ -44,23 +43,6 @@ jobs:
                 distribution: 'temurin'
                 java-version: 11
 
-
-            - name: Set up Ruby
-              uses: ruby/setup-ruby@v1
-              with:
-                ruby-version: 2.6.9
-
-            - name: Build Website
-              run: |
-                #!/bin/bash
-                set -e
-                sudo apt-get update
-                sudo apt-get install -y libxslt-dev libxml2-dev
-                cd site
-                make setup
-                make latest_javadoc
-                make apache
-
             - name: Setup NodeJS
               uses: actions/setup-node@v2
               with:
@@ -69,6 +51,6 @@ jobs:
             - name: Setup yarn
               run: npm install -g yarn
 
-            - name: Build staging website
+            - name: Build website
               run: |
                 ./site3/website/scripts/build-website.sh
diff --git a/.github/workflows/website-staging-deploy.yaml 
b/.github/workflows/website-staging-deploy.yaml
deleted file mode 100644
index 27168b222..000000000
--- a/.github/workflows/website-staging-deploy.yaml
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# 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.
-#
-
-name: Website staging deploy
-on:
-  workflow_dispatch:
-  push:
-    branches:
-      - master
-    paths:
-      - 'site3/**'
-      - '.github/workflows/website-staging-deploy.yaml'
-
-env:
-  DEPLOY_URL: "https://bookkeeper.staged.apache.org/";
-
-jobs:
-  stage-website:
-    name: Build and stage website
-    if: ${{ github.repository == 'apache/bookkeeper' }}
-    runs-on: ubuntu-latest
-    timeout-minutes: 180
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v2
-
-      - name: Set up JDK 11
-        uses: actions/setup-java@v2
-        with:
-          distribution: 'temurin'
-          java-version: 11
-
-      - name: Setup NodeJS
-        uses: actions/setup-node@v2
-        with:
-          node-version: '14'
-
-      - name: Setup yarn
-        run: npm install -g yarn
-
-      - name: Publish
-        env:
-          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
-        run: |
-          ./site3/website/scripts/build-website.sh
-          ./site3/website/scripts/publish-website.sh
\ No newline at end of file
diff --git a/site3/website/scripts/publish-website.sh 
b/site3/website/scripts/publish-website.sh
index a13abe09c..bbf55ea8c 100755
--- a/site3/website/scripts/publish-website.sh
+++ b/site3/website/scripts/publish-website.sh
@@ -32,7 +32,7 @@ TMP_DIR=/tmp/bookkeeper-site
   cd $TMP_DIR
 
   # clone the remote repo
-  git clone --depth 1 -b asf-staging 
"https://site-updater:${GITHUB_TOKEN}@$ORIGIN_REPO"; .
+  git clone --depth 1 -b asf-site 
"https://site-updater:${GITHUB_TOKEN}@$ORIGIN_REPO"; .
   git config user.name "Apache BookKeeper Site Updater"
   git config user.email "[email protected]"
   # copy the apache generated dir
@@ -40,7 +40,7 @@ TMP_DIR=/tmp/bookkeeper-site
   cp -r $ROOT_DIR/site3/website/build/* content
 
   git add -A .
-  git diff-index --quiet HEAD || (git commit -m "Updated site at revision 
$REVISION" && git push -q origin HEAD:asf-staging)
+  git diff-index --quiet HEAD || (git commit -m "Updated site at revision 
$REVISION" && git push -q origin HEAD:asf-site)
 
   rm -rf $TMP_DIR
 )

Reply via email to