Skip to content

Commit

Permalink
chore: add docusaurus cache to CI cache
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-vrijswijk committed Nov 30, 2023
1 parent 1ae6709 commit 1d3ddfa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ jobs:
# Use same version of node for netlify and CI build
node-version-file: '.nvmrc'
cache: 'npm'
- name: Docusaurus cache
uses: actions/cache@v3
with:
path: |
.docusaurus
node_modules/.cache
key: ${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}-
${{ runner.os }}-docusaurus-
- run: npm ci
- name: Lint 🧶
run: npm run lint
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ jobs:
with:
path: |
.docusaurus
node_modules/.cache
key: ${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}-
${{ runner.os }}-docusaurus-
- run: npm ci
- name: Build 🏗️
run: npm run build
Expand Down

0 comments on commit 1d3ddfa

Please sign in to comment.