Skip to content

Commit

Permalink
cache data (observablehq#804)
Browse files Browse the repository at this point in the history
* cache data

* cache examples, too
  • Loading branch information
mbostock committed Feb 15, 2024
1 parent 07a33cd commit 824ec4a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ jobs:
yarn.lock
'examples/*/yarn.lock'
- run: yarn --frozen-lockfile
- id: date
run: echo "date=$(TZ=America/Los_Angeles date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- id: cache-data
uses: actions/cache@v4
with:
path: |
docs/.observablehq/cache
'examples/*/docs/.observablehq/cache'
key: data-${{ hashFiles('docs/data/*', 'examples/*/docs/data/*') }}-${{ steps.date.outputs.date }}
- if: steps.cache-data.outputs.cache-hit == 'true'
run: find docs/.observablehq/cache examples/*/docs/.observablehq/cache -type f -exec touch {} +
- run: yarn build
- name: Build example "api"
run: yarn --frozen-lockfile && yarn build
Expand Down

0 comments on commit 824ec4a

Please sign in to comment.