You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/10/14 11:03:40 UTC

(maven-site) branch master updated: Save the site build's Maven cache on master and restore it in pull requests

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

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


The following commit(s) were added to refs/heads/master by this push:
     new cd8c1b13 Save the site build's Maven cache on master and restore it in pull requests
cd8c1b13 is described below

commit cd8c1b137ff36621a63a274a8e03503cf317801c
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Wed Oct 14 02:29:08 2026 +0200

    Save the site build's Maven cache on master and restore it in pull requests
    
    Each pull request saved its own Maven cache, which no other build can read.
    A pull request may read master's, so master now builds on push and saves.
---
 .github/workflows/verify-site.yml | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/verify-site.yml b/.github/workflows/verify-site.yml
index 4227b42d..625647d1 100644
--- a/.github/workflows/verify-site.yml
+++ b/.github/workflows/verify-site.yml
@@ -17,11 +17,15 @@
 
 name: Verify Site
 
-on: pull_request
+on:
+  pull_request:
+  # master saves the Maven cache that pull requests restore; a pull request can only read its own and master's
+  push:
+    branches: [master]
 
 # allow single build per PR
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.number }}
+  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
   cancel-in-progress: true
 
 permissions: {}
@@ -44,6 +48,7 @@ jobs:
           java-version: 21
           distribution: 'zulu'
           cache: 'maven'
+          cache-read-only: ${{ github.event_name == 'pull_request' }}
 
       - name: Set up Maven
         run:
@@ -55,6 +60,6 @@ jobs:
       - name: Upload Maven Site
         uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
         with:
-          name: ${{ github.event.number }}-${{ github.run_number }}-site
+          name: ${{ github.event.number || github.ref_name }}-${{ github.run_number }}-site
           path: |
             target/site/**