Skip to content

Commit 2019d1e

Browse files
committed
Attempt to cache D2 database
Should speed up PR builds, by using the database created by the deploy step.
1 parent 982b2e5 commit 2019d1e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10-
1110
build:
1211
name: Build docs
1312
runs-on: ubuntu-latest
@@ -33,6 +32,11 @@ jobs:
3332
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
3433
restore-keys: |
3534
${{ runner.os }}-pip-
35+
- name: Cache d2 database
36+
uses: actions/cache/restore@v4.2.0 # We only want to restore the cache, to avoid overwriting the cache on PRs
37+
with:
38+
path: .cache/plugin/d2
39+
key: ${{ runner.os }}-d2
3640
- name: Install d2
3741
run: |
3842
mkdir -p /tmp/d2
@@ -74,6 +78,11 @@ jobs:
7478
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
7579
restore-keys: |
7680
${{ runner.os }}-pip-
81+
- name: Cache d2 database
82+
uses: actions/cache@v4.2.0
83+
with:
84+
path: .cache/plugin/d2
85+
key: ${{ runner.os }}-d2
7786
- name: Install d2
7887
run: |
7988
mkdir -p /tmp/d2

0 commit comments

Comments
 (0)