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

zabetak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hive-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 75c8409  HIVE-29142: Add a GitHub action that builds the Website on 
every PR (#65)
75c8409 is described below

commit 75c84098248794c32ac8021caf952f5deea9a3d0
Author: Stamatis Zampetakis <[email protected]>
AuthorDate: Wed Sep 24 08:36:52 2025 +0200

    HIVE-29142: Add a GitHub action that builds the Website on every PR (#65)
    
    Refactor GitHub workflow to:
    1. Build site using Hugo on every pull-request and push to main
    2. Deploy site on every push to main after a succeful build
---
 .github/workflows/gh-pages.yml | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 8a6e329..7e1a180 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -23,12 +23,16 @@ on:
   push:
     branches:
       - main  # Set a branch to deploy
+  pull_request:
+    branches:
+      - main
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
 
 jobs:
-  deploy:
+  build:
     runs-on: ubuntu-22.04
-    concurrency:
-      group: ${{ github.workflow }}-${{ github.ref }}
     steps:
       - uses: actions/checkout@v3
         with:
@@ -47,6 +51,24 @@ jobs:
       - name: Copy .asf.yaml
         run: cp .asf.yaml ./public
 
+      - name: Upload site artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: site
+          include-hidden-files: true # For .asf.yaml
+          path: public
+
+  deploy:
+    needs: build
+    if: github.event_name == 'push'
+    runs-on: ubuntu-22.04
+    steps:
+      - name: Download site artifact
+        uses: actions/download-artifact@v4
+        with:
+          name: site
+          path: ./public
+
       - name: Deploy
         uses: peaceiris/actions-gh-pages@v3
         with:

Reply via email to