Skip to content

Commit

Permalink
perf(actions): better caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Nov 22, 2020
1 parent d489cfa commit 6da0a65
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ jobs:
uses: actions/cache@v2
id: cache-dependencies
with:
key: build-${{ github.sha }}
key: deps-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
path: ./*

build-dist:
Expand All @@ -252,7 +252,7 @@ jobs:
uses: actions/cache@v2
id: restore-dependencies
with:
key: build-${{ github.sha }}
key: deps-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
path: ./*

- name: Use node ${{ env.NODE_BASE_VERSION }}
Expand All @@ -267,7 +267,7 @@ jobs:
uses: actions/cache@v2
id: cache-dist
with:
key: build-${{ github.sha }}-dist
key: dist-${{ github.sha }}
path: |
./dist
./build
Expand All @@ -284,14 +284,14 @@ jobs:
uses: actions/cache@v2
id: restore-dependencies
with:
key: build-${{ github.sha }}
key: deps-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
path: ./*

- name: Restore distributables
uses: actions/cache@v2
id: restore-dist
with:
key: build-${{ github.sha }}-dist
key: dist-${{ github.sha }}
path: |
./dist
./build
Expand All @@ -316,7 +316,7 @@ jobs:
uses: actions/cache@v2
id: restore-dependencies
with:
key: build-${{ github.sha }}
key: deps-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
path: ./*

- name: Use node ${{ env.NODE_BASE_VERSION }}
Expand All @@ -331,15 +331,15 @@ jobs:
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v2
with:
name: build-${{ github.sha }}-docs
name: docs-${{ github.sha }}
path: ./docs

- name: Cache documentation
if: github.event_name != 'pull_request'
uses: actions/cache@v2
id: cache-docs
with:
key: build-${{ github.sha }}-docs
key: docs-${{ github.sha }}
path: ./docs

lint:
Expand All @@ -350,7 +350,7 @@ jobs:
uses: actions/cache@v2
id: restore-dependencies
with:
key: build-${{ github.sha }}
key: deps-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
path: ./*

- name: Use node ${{ env.NODE_BASE_VERSION }}
Expand All @@ -369,7 +369,7 @@ jobs:
uses: actions/cache@v2
id: restore-dependencies
with:
key: build-${{ github.sha }}
key: deps-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
path: ./*

- name: Use node ${{ env.NODE_BASE_VERSION }}
Expand Down Expand Up @@ -419,14 +419,14 @@ jobs:
uses: actions/cache@v2
id: restore-dependencies
with:
key: build-${{ github.sha }}
key: deps-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
path: ./*

- name: Restore distributables
uses: actions/cache@v2
id: restore-dist
with:
key: build-${{ github.sha }}-dist
key: dist-${{ github.sha }}
path: |
./dist
./build
Expand All @@ -436,7 +436,7 @@ jobs:
uses: actions/cache@v2
id: restore-docs
with:
key: build-${{ github.sha }}-docs
key: docs-${{ github.sha }}
path: ./docs

- name: Use node ${{ env.NODE_BASE_VERSION }}
Expand Down

0 comments on commit 6da0a65

Please sign in to comment.