Skip to content

Commit ef03f90

Browse files
committed
fix(ci): use cache to bundle staged artifacts
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 14993a6 commit ef03f90

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/sphinxbuild.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -342,16 +342,16 @@ jobs:
342342
find deploy-staging -type f | head -20
343343
344344
# ========================================================================
345-
# UPLOAD STAGING ARTIFACTS
345+
# CACHE STAGING ARTIFACTS
346346
# ========================================================================
347-
# Upload only the NEW artifacts in their branch structure.
348-
# The deploy job will handle merging with existing versions on gh-pages.
347+
# Cache the staging folder for use in deploy job.
348+
# This avoids artifact storage overhead (saves ~1.8GB).
349349
# ========================================================================
350-
- name: Upload staged artifacts
351-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
350+
- name: Cache staged artifacts
351+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
352352
with:
353-
name: staged-documentation-${{ steps.branch.outputs.branch_name }}
354353
path: deploy-staging/
354+
key: staged-docs-${{ github.sha }}
355355

356356
# ============================================================================
357357
# DEPLOY
@@ -391,11 +391,12 @@ jobs:
391391
fetch-depth: 1
392392
persist-credentials: false
393393

394-
- name: Download staged artifacts
395-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
394+
- name: Restore staged artifacts from cache
395+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
396396
with:
397-
name: staged-documentation-${{ needs.stage-and-check.outputs.branch_name }}
398397
path: stage/
398+
key: staged-docs-${{ github.sha }}
399+
fail-on-cache-miss: true
399400

400401
# ========================================================================
401402
# APPLY STAGED ARTIFACTS TO GH-PAGES

0 commit comments

Comments
 (0)