You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/11/24 04:20:36 UTC

[iotdb] 01/01: Deplopy website using github

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

haonan pushed a commit to branch deploy_site_using_github
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 09539fb3d4990901b45f1b18d2e6608bc5d61c7c
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Nov 24 12:20:20 2022 +0800

    Deplopy website using github
---
 .github/workflows/site-build.yml | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/site-build.yml b/.github/workflows/site-build.yml
index d8eacdd966..1041d06357 100644
--- a/.github/workflows/site-build.yml
+++ b/.github/workflows/site-build.yml
@@ -4,14 +4,12 @@ on:
   push:
     branches:
       - master
-      - 'rel/*'
     paths:
       - 'docs/**'
       - 'site/**'
   pull_request:
     branches:
       - master
-      - 'rel/*'
     paths:
       - 'docs/**'
       - 'site/**'
@@ -27,12 +25,8 @@ env:
 
 jobs:
   test:
-    strategy:
-      fail-fast: false
-      max-parallel: 20
-      matrix:
-        os: [ ubuntu-latest ]
-    runs-on: ${{ matrix.os}}
+    runs-on: ubuntu-latest
+    if: github.event_name == 'pull_request'
 
     steps:
       - uses: actions/checkout@v3
@@ -43,4 +37,19 @@ jobs:
           key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
           restore-keys: ${{ runner.os }}-m2-
       - name: Test compile website
-        run: mvn -P site -P compile-site -P compile-site-0.13 -P compile-site-0.12 -P compile-site-0.11 -P compile-site-0.10 -P compile-site-0.9 -P compile-site-0.8 compile -pl site
\ No newline at end of file
+        run: mvn -P site -P compile-site -P compile-site-0.13 -P compile-site-0.12 -P compile-site-0.11 -P compile-site-0.10 -P compile-site-0.9 -P compile-site-0.8 compile -pl site
+
+  deploy:
+    runs-on: ubuntu-latest
+    if: github.event_name == 'push'
+
+    steps:
+      - uses: actions/checkout@v3
+      - name: Cache Maven packages
+        uses: actions/cache@v3
+        with:
+          path: ~/.m2
+          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+          restore-keys: ${{ runner.os }}-m2-
+      - name: Compile and deploy website
+        run: mvn -P site -P compile-site -P compile-site-0.13 -P compile-site-0.12 -P compile-site-0.11 -P compile-site-0.10 -P compile-site-0.9 -P compile-site-0.8 compile scm-publish:publish-scm -pl site
\ No newline at end of file