.github/workflows/gh-pages.yml: cache bi-weekly

This commit is contained in:
Harald Hoyer 2020-03-03 15:57:26 +01:00
parent def8d8c148
commit 24900e47d9
No known key found for this signature in database
GPG key ID: 340F12141EA0994D

View file

@ -11,15 +11,26 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set CURRENT_TWO_WEEKS for use in cache keys
run: echo "::set-env name=CURRENT_TWO_WEEKS::$(($(date +%V) / 2))"
- name: Cache cargo registry - name: Cache cargo registry
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ env.CURRENT_TWO_WEEKS }}
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ env.CURRENT_TWO_WEEKS }}
- name: Cache mdbook binary
uses: actions/cache@v1
with:
path: ~/.cargo/bin/mdbook
key: ${{ runner.os }}-cargo-mdbook-${{ env.CURRENT_TWO_WEEKS }}
- name: Build mdbook - name: Build mdbook
run: cargo install mdbook run: cargo install mdbook