docs: Add cache step

This commit is contained in:
peaceiris 2019-11-10 14:19:52 +09:00
parent 8981758aad
commit 645870064d
1 changed files with 38 additions and 3 deletions

View File

@ -383,9 +383,20 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: |
npm install
npm run build
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm install
- name: Build
run: npm run build
- name: deploy
uses: peaceiris/actions-gh-pages@v2.5.0
@ -423,6 +434,14 @@ jobs:
with:
node-version: '10.x'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: install
run: npm install
@ -473,6 +492,14 @@ jobs:
with:
node-version: '10.x'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: install
run: yarn install
@ -523,6 +550,14 @@ jobs:
with:
node-version: '10.x'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: install
run: npm install