Skip to content

Commit 824ec4a

Browse files
authored
cache data (#804)
* cache data * cache examples, too
1 parent 07a33cd commit 824ec4a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ jobs:
2323
yarn.lock
2424
'examples/*/yarn.lock'
2525
- run: yarn --frozen-lockfile
26+
- id: date
27+
run: echo "date=$(TZ=America/Los_Angeles date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
28+
- id: cache-data
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
docs/.observablehq/cache
33+
'examples/*/docs/.observablehq/cache'
34+
key: data-${{ hashFiles('docs/data/*', 'examples/*/docs/data/*') }}-${{ steps.date.outputs.date }}
35+
- if: steps.cache-data.outputs.cache-hit == 'true'
36+
run: find docs/.observablehq/cache examples/*/docs/.observablehq/cache -type f -exec touch {} +
2637
- run: yarn build
2738
- name: Build example "api"
2839
run: yarn --frozen-lockfile && yarn build

0 commit comments

Comments
 (0)