Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/actions/cache-typst/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Cache Typst package"
description: "Configures the caching for Typst packages"

runs:
using: "composite"
steps:
- name: Typst Cache path
run: |
case $RUNNER_OS in
"Linux")
echo "TYPST_CACHE=${XDG_CACHE_HOME:-~/.cache}/typst/packages/" >> $GITHUB_ENV
;;
"macOS")
echo "TYPST_CACHE=~/Library/Caches/typst/packages/" >> $GITHUB_ENV
;;
"Windows")
echo "TYPST_CACHE=$LOCALAPPDATA/typst/packages/" >> $GITHUB_ENV
;;
*)
echo "$RUNNER_OS not supported"
exit 1
;;
esac
shell: bash

- name: Cache Typst package folder
uses: actions/cache@v3
with:
path: ${{ env.TYPST_CACHE }}
key: ${{ runner.os }}-typst-1-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-typst-1-
3 changes: 3 additions & 0 deletions .github/workflows/test-smokes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ jobs:
run: |
quarto install tinytex

- name: Cache Typst packages
uses: ./.github/actions/cache-typst

- name: Install Chrome
uses: browser-actions/setup-chrome@latest

Expand Down