diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 8b6f28bc5..4045b7cf6 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -58,7 +58,7 @@ jobs: - name: Save _freeze folder id: cache-save - if: always() + if: ${{ !cancelled() }} uses: actions/cache/save@v4 with: path: | @@ -67,7 +67,7 @@ jobs: - name: Save Julia depot cache id: julia-cache-save - if: always() && steps.julia-cache.outputs.cache-hit != 'true' + if: ${{ !cancelled() && steps.julia-cache.outputs.cache-hit != 'true' }} uses: actions/cache/save@v4 with: path: ${{ steps.julia-cache.outputs.cache-paths }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7ffcc1d23..b5a7c8bd3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,7 +28,11 @@ jobs: version: '1.11' - name: Load Julia packages from cache - uses: julia-actions/cache@v2 + id: julia-cache + uses: penelopeysm/julia-cache@main + with: + cache-name: julia-cache;${{ hashFiles('**/Manifest.toml') }} + delete-old-caches: false # Note: needs resolve() to fix #518 - name: Instantiate Julia environment @@ -86,12 +90,21 @@ jobs: - name: Save _freeze folder id: cache-save + if: ${{ !cancelled() }} uses: actions/cache/save@v4 with: path: | ./_freeze/ key: ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}-${{ hashFiles('**/index.qmd') }} + - name: Save Julia depot cache + id: julia-cache-save + if: ${{ !cancelled() && steps.julia-cache.outputs.cache-hit != 'true' }} + uses: actions/cache/save@v4 + with: + path: ${{ steps.julia-cache.outputs.cache-paths }} + key: ${{ steps.julia-cache.outputs.cache-key }} + - name: Fetch search_original.json from main site run: curl -O https://raw.githubusercontent.com/TuringLang/turinglang.github.io/gh-pages/search_original.json