mirror of
https://github.com/haraldh/chainerror.git
synced 2025-01-31 00:56:41 +01:00
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: github pages
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- 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
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ env.CURRENT_TWO_WEEKS }}
|
|
|
|
- name: Cache cargo index
|
|
uses: actions/cache@v1
|
|
with:
|
|
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
|
|
run: cargo install mdbook
|
|
|
|
- name: Build
|
|
run: mdbook build
|
|
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
|
publish_dir: ./book
|