chainerror/.github/workflows/gh-pages.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

2020-03-03 15:01:25 +01:00
name: github pages
on:
push:
tags:
- '*'
2020-03-03 15:01:25 +01:00
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 }}
2020-03-03 15:01:25 +01:00
- name: Build mdbook
run: cargo install mdbook
2020-08-28 16:45:24 +02:00
- name: Build cargo-readme
run: cargo install cargo-readme
- name: Build README.md
run: cargo readme > README.md
2020-03-03 15:01:25 +01:00
- name: Build
run: mdbook build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./book