From b0923a211bf273b36de7f8930fad93d5b745b73d Mon Sep 17 00:00:00 2001 From: Olufunke Moronfolu Date: Mon, 3 Aug 2026 14:36:08 +0200 Subject: [PATCH 1/2] Optimize fetch depth for PR builds --- .github/workflows/build-and-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index e9b7f62b50a..76eb8ca3168 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -34,8 +34,8 @@ jobs: - name: Checkout repo uses: actions/checkout@v6 with: - # 20000 commits required for Hugo to populate last-modified dates on pages - fetch-depth: 20000 + # Keep PR builds fast; Hugo only needs deep history for push builds that publish the site. + fetch-depth: ${{ github.event_name == 'pull_request' && 1 || 20000 }} submodules: false - name: Set up Node.js From 65827722a578665c6c7415c29d54fdbded007750 Mon Sep 17 00:00:00 2001 From: Olufunke Moronfolu Date: Tue, 4 Aug 2026 14:30:31 +0200 Subject: [PATCH 2/2] add partial clone to reduce the 20k commit time --- .github/workflows/build-and-deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 76eb8ca3168..e0792778d79 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -34,9 +34,10 @@ jobs: - name: Checkout repo uses: actions/checkout@v6 with: - # Keep PR builds fast; Hugo only needs deep history for push builds that publish the site. - fetch-depth: ${{ github.event_name == 'pull_request' && 1 || 20000 }} + # 20000 commits required for Hugo to populate last-modified dates on pages + fetch-depth: 20000 submodules: false + filter: blob:none - name: Set up Node.js uses: actions/setup-node@v6