Skip to content

Commit 1bc57e7

Browse files
committed
Use same key on publish & preview workflows so that caches can be shared
1 parent c62ba76 commit 1bc57e7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ jobs:
2828
version: '1.11'
2929

3030
- name: Load Julia packages from cache
31-
uses: julia-actions/cache@v2
31+
id: julia-cache
32+
uses: penelopeysm/julia-cache@main
33+
with:
34+
cache-name: julia-cache;${{ hashFiles('**/Manifest.toml') }}
35+
delete-old-caches: false
3236

3337
# Note: needs resolve() to fix #518
3438
- name: Instantiate Julia environment
@@ -86,12 +90,21 @@ jobs:
8690

8791
- name: Save _freeze folder
8892
id: cache-save
93+
if: ${{ !cancelled() }}
8994
uses: actions/cache/save@v4
9095
with:
9196
path: |
9297
./_freeze/
9398
key: ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}-${{ hashFiles('**/index.qmd') }}
9499

100+
- name: Save Julia depot cache
101+
id: julia-cache-save
102+
if: ${{ !cancelled() && steps.julia-cache.outputs.cache-hit != 'true' }}
103+
uses: actions/cache/save@v4
104+
with:
105+
path: ${{ steps.julia-cache.outputs.cache-paths }}
106+
key: ${{ steps.julia-cache.outputs.cache-key }}
107+
95108
- name: Fetch search_original.json from main site
96109
run: curl -O https://raw.githubusercontent.com/TuringLang/turinglang.github.io/gh-pages/search_original.json
97110

0 commit comments

Comments
 (0)