abstreet/.github/workflows/book.yml

49 lines
1.2 KiB
YAML
Raw Normal View History

# From https://github.com/rust-lang/mdBook/pull/1248
name: Book
on:
push:
branches:
- master
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: Install Rust
uses: hecrj/setup-rust-action@v1
- name: Update apt
run: sudo apt-get update
- name: Install plantuml
run: sudo apt-get install plantuml
- name: Install mdbook-plantuml
run: cargo install mdbook-plantuml
- name: Generate book from markdown
run: |
cd book
mdbook build
- name: Generate rustdoc
run: |
cargo doc --no-deps --workspace --exclude widgetry --document-private-items
cd widgetry
cargo doc --no-deps --document-private-items
cd ..
mv target/doc book/book/rustdoc
- name: Publish HTML
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book/