2020-08-10 23:49:30 +03:00
|
|
|
# From https://github.com/rust-lang/mdBook/pull/1248
|
|
|
|
name: Book
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
book:
|
|
|
|
name: Build and Deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install mdbook
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
with:
|
|
|
|
mdbook-version: "0.3.7"
|
|
|
|
|
|
|
|
- name: Generate book from markdown
|
|
|
|
run: |
|
|
|
|
cd book
|
|
|
|
mdbook build
|
2020-08-19 21:33:00 +03:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: hecrj/setup-rust-action@v1
|
|
|
|
|
|
|
|
- name: Generate rustdoc
|
|
|
|
run: |
|
|
|
|
cargo doc --no-deps
|
|
|
|
mv target/doc book/book/rustdoc
|
|
|
|
|
2020-08-10 23:49:30 +03:00
|
|
|
- name: Publish HTML
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./book/book/
|