Skip to content

Commit

Permalink
Actions caching dependencies for Docusaurus builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Jwaegebaert authored and Waldek Mastykarz committed Jan 3, 2024
1 parent ae3d33b commit 1e22f83
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,19 @@ jobs:
with:
node-version: 18

- name: Install dependencies
- name: Cache node modules
id: cache
uses: actions/cache@v3
with:
path: |
**/docs/node_modules
key: docs_node_modules-${{ hashFiles('**/docs/package-lock.json') }}

- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: docs

- name: Build docs
run: npm run build
working-directory: docs
working-directory: docs
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,16 @@ jobs:
with:
node-version: 18

- name: Install dependencies
- name: Cache node modules
id: cache
uses: actions/cache@v3
with:
path: |
**/docs/node_modules
key: docs_node_modules-${{ hashFiles('**/docs/package-lock.json') }}

- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: docs

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,16 @@ jobs:
with:
node-version: 18

- name: Install dependencies
- name: Cache node modules
id: cache
uses: actions/cache@v3
with:
path: |
**/docs/node_modules
key: docs_node_modules-${{ hashFiles('**/docs/package-lock.json') }}

- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: docs

Expand Down

0 comments on commit 1e22f83

Please sign in to comment.