mod(deploy/ci): Added caching to improve action speed.

This commit is contained in:
Taso authored and GitHub committed 2020-12-13 12:20:30 -05:00
1 parent 9bd927ce68
commit 18fc19e03a
1 file changed
+10
+10
View File
@@ -18,6 +18,16 @@ jobs:
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use Node.js
uses: actions/setup-node@v1
with: