mirror of https://github.com/ColorlibHQ/AdminLTE
Tweak CI cache (#2904)
Enable cache on Windows and fix cache directory to work on all OS'espull/2911/head
parent
738ee83fa8
commit
7d42f7cceb
|
@ -36,11 +36,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
|
|
||||||
|
- name: Get npm cache directory
|
||||||
|
id: npm-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
- name: Set up npm cache
|
- name: Set up npm cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
if: ${{ !startsWith(runner.os, 'windows') }}
|
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
|
@ -34,10 +34,15 @@ jobs:
|
||||||
- name: Disable gem docs
|
- name: Disable gem docs
|
||||||
run: 'echo "gem: --no-document" > ~/.gemrc'
|
run: 'echo "gem: --no-document" > ~/.gemrc'
|
||||||
|
|
||||||
|
- name: Get npm cache directory
|
||||||
|
id: npm-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
- name: Set up npm cache
|
- name: Set up npm cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
Loading…
Reference in New Issue