You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by ni...@apache.org on 2022/04/06 09:17:13 UTC

[bookkeeper] branch master updated: [website] add CI checks to validate the website (#3164)

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 7b38a6a15 [website] add CI checks to validate the website (#3164)
7b38a6a15 is described below

commit 7b38a6a1565279c91a25a54820e9dba2cb563bab
Author: Nicolò Boschi <bo...@gmail.com>
AuthorDate: Wed Apr 6 11:17:07 2022 +0200

    [website] add CI checks to validate the website (#3164)
---
 .github/workflows/website-pr-validation.yml | 74 +++++++++++++++++++++++++++++
 site3/README.md                             |  6 ++-
 2 files changed, 79 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/website-pr-validation.yml b/.github/workflows/website-pr-validation.yml
new file mode 100644
index 000000000..9438d9911
--- /dev/null
+++ b/.github/workflows/website-pr-validation.yml
@@ -0,0 +1,74 @@
+#
+# 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 PR validation
+
+on:
+  pull_request:
+    branches:
+      - master
+      - branch-*
+    paths:
+      - 'site/**'
+      - 'site3/**'
+      - '.github/workflows/website-pr-validation.yaml'
+    workflow_dispatch:
+
+jobs:
+  website-pull-validation:
+    runs-on: ubuntu-latest
+    timeout-minutes: 60
+    steps:
+      - name: Checkout
+          uses: actions/checkout@v2
+
+            - name: Set up JDK 11
+              uses: actions/setup-java@v2
+              with:
+                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:
+                node-version: '14'
+
+            - name: Setup yarn
+              run: npm install -g yarn
+
+            - name: Build staging website
+              run: |
+                ./site3/website/scripts/build-website.sh
diff --git a/site3/README.md b/site3/README.md
index 30a50161d..e4c451325 100644
--- a/site3/README.md
+++ b/site3/README.md
@@ -7,12 +7,15 @@ The "next" release doc is under `docs` directory. If you need to edit the sideba
 ### Patch release
 In order to add the release you have to follow the [official Docusaurus guide](https://docusaurus.io/docs/versioning#tagging-a-new-version)
 
+Ensure you have [yarn](https://classic.yarnpkg.com/lang/en/docs/install) installed.
+
 For each minor release only the latest patch version documentation is kept.
 
 ```
 LATEST_RELEASED=4.14.4
 NEW_RELEASE=4.14.5
 
+cd site3/website
 yarn run docusaurus docs:version $NEW_RELEASE
 rm -rf versioned_docs/version-${LATEST_RELEASED}
 rm -rf versioned_sidebars/version-${LATEST_RELEASED}-sidebars.json
@@ -28,9 +31,10 @@ Then you have to:
 ### Major/minor release
 
 ```
-LATEST_RELEASED=4.14.4
 NEW_RELEASE=4.15.0
 
+cd site3/website
+yarn install
 yarn run docusaurus docs:version $NEW_RELEASE
 
 ```