panorama/.github/workflows/doc.yml

50 lines
1,002 B
YAML
Raw Normal View History

2021-02-22 20:36:53 +00:00
on:
push:
branches:
- master
2021-02-16 10:52:42 +00:00
2021-02-23 04:50:39 +00:00
name: publish-documentation
2021-02-16 10:52:42 +00:00
jobs:
2021-02-16 21:33:36 +00:00
doc:
name: panorama
2021-02-16 10:52:42 +00:00
runs-on: ubuntu-latest
steps:
2021-02-16 10:55:36 +00:00
- name: checkout
uses: actions/checkout@v2
- name: rust
uses: actions-rs/toolchain@v1
2021-02-16 10:52:42 +00:00
with:
toolchain: stable
2021-02-16 10:55:36 +00:00
- name: mdbook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- name: build mdbook
run: |
2021-02-16 10:52:42 +00:00
mdbook build docs -d $(pwd)/public
2021-02-16 10:55:36 +00:00
- name: build api docs
run: |
cargo doc --workspace --no-deps --document-private-items
2021-02-16 10:52:42 +00:00
cp -r target/doc public/api
2021-02-16 10:55:36 +00:00
2021-02-16 10:52:42 +00:00
- name: deploy
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
branch: gh-pages
folder: public
2021-03-20 09:52:59 +00:00
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo
# vim: set ts=2 tw=2 sw=2 et :