abstreet/.github/workflows/book.yml
2021-04-14 14:23:18 -07:00

36 lines
980 B
YAML

name: Rust docs
on:
push:
branches:
- master
jobs:
book:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: hecrj/setup-rust-action@v1
- name: Update apt
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev libpango1.0-dev libgtk-3-dev
- name: Generate rustdoc
run: |
cargo doc --no-deps --workspace --exclude widgetry --document-private-items
cd widgetry
cargo doc --no-deps --document-private-items --features native-backend
cd ..
mkdir -p book/book
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/