.github/workflows/gh-pages.yml: cache mdbook build

This commit is contained in:
Harald Hoyer 2020-03-03 15:44:01 +01:00
parent 1d43a39c61
commit db7683f90f
No known key found for this signature in database
GPG key ID: 340F12141EA0994D

View file

@ -2,18 +2,30 @@ name: github pages
on: on:
push: push:
branches: tags:
- master - '*'
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Build mdbook - name: Build mdbook
run: cargo install mdbook run: cargo install mdbook
- name: Build - name: Build
run: mdbook build run: mdbook build