Skip to content

Commit 9dd0689

Browse files
Copilotskjnldsv
andcommitted
perf: remove useless git caching from build jobs, cache gh-pages content in stage-and-check
Agent-Logs-Url: https://github.com/nextcloud/documentation/sessions/6b26cc44-eeab-4f6d-b753-625d724da038 Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com>
1 parent a44c124 commit 9dd0689

1 file changed

Lines changed: 7 additions & 45 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ jobs:
9090
publish: true
9191

9292
steps:
93-
- name: Cache git metadata
94-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
95-
with:
96-
path: .git
97-
key: git-metadata-${{ github.sha }}
98-
restore-keys: |
99-
git-metadata-${{ github.sha }}
100-
git-metadata
101-
10293
- name: Checkout repository
10394
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
10495

@@ -141,15 +132,6 @@ jobs:
141132
build_pdf_path: "_build/latex"
142133

143134
steps:
144-
- name: Cache git metadata
145-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
146-
with:
147-
path: .git
148-
key: git-metadata-${{ github.sha }}
149-
restore-keys: |
150-
git-metadata-${{ github.sha }}
151-
git-metadata
152-
153135
- name: Checkout repository
154136
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
155137

@@ -245,15 +227,6 @@ jobs:
245227
additional_deployment: ${{ steps.branch.outputs.additional_deployment }}
246228

247229
steps:
248-
- name: Cache git metadata
249-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
250-
with:
251-
path: .git
252-
key: git-metadata-${{ github.sha }}
253-
restore-keys: |
254-
git-metadata-${{ github.sha }}
255-
git-metadata
256-
257230
- name: Checkout repository
258231
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
259232

@@ -274,18 +247,16 @@ jobs:
274247
# ========================================================================
275248
# FETCH GH-PAGES FOR LINK VALIDATION CONTEXT
276249
# ========================================================================
277-
# We need the existing gh-pages content (old versions) so that link
278-
# validation can resolve cross-version references. We use git cache
279-
# to make this fast.
250+
# We cache the gh-pages checkout between runs so that repeated workflow
251+
# runs (e.g. on pull requests) don't have to re-fetch the full gh-pages
252+
# branch every time.
280253
# ========================================================================
281-
- name: Cache git metadata for gh-pages
254+
- name: Cache gh-pages content for validation context
282255
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
283256
with:
284-
path: .git
285-
key: git-metadata-${{ github.sha }}
286-
restore-keys: |
287-
git-metadata-${{ github.sha }}
288-
git-metadata
257+
path: validation-context/
258+
key: gh-pages-content-${{ github.run_id }}
259+
restore-keys: gh-pages-content-
289260

290261
- name: Checkout gh-pages branch for validation context
291262
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -424,15 +395,6 @@ jobs:
424395
pull-requests: write
425396

426397
steps:
427-
- name: Cache git metadata
428-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
429-
with:
430-
path: .git
431-
key: git-metadata-${{ github.sha }}
432-
restore-keys: |
433-
git-metadata-${{ github.sha }}
434-
git-metadata
435-
436398
- name: Checkout gh-pages branch
437399
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
438400
with:

0 commit comments

Comments
 (0)