2021-02-01 02:44:41 +03:00
|
|
|
name: Rust docs
|
2020-08-20 23:43:40 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-08-10 23:49:30 +03:00
|
|
|
jobs:
|
|
|
|
book:
|
|
|
|
name: Build and Deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-08-24 00:10:52 +03:00
|
|
|
- name: Install Rust
|
|
|
|
uses: hecrj/setup-rust-action@v1
|
|
|
|
|
|
|
|
- name: Update apt
|
|
|
|
run: sudo apt-get update
|
2021-04-15 00:23:18 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get install libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev libpango1.0-dev libgtk-3-dev
|
2020-08-19 21:33:00 +03:00
|
|
|
|
|
|
|
- name: Generate rustdoc
|
|
|
|
run: |
|
2020-08-27 20:37:04 +03:00
|
|
|
cargo doc --no-deps --workspace --exclude widgetry --document-private-items
|
|
|
|
cd widgetry
|
2020-11-24 10:39:55 +03:00
|
|
|
cargo doc --no-deps --document-private-items --features native-backend
|
2020-08-21 02:46:08 +03:00
|
|
|
cd ..
|
2021-02-01 02:44:41 +03:00
|
|
|
mkdir -p book/book
|
2020-08-19 21:33:00 +03:00
|
|
|
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/
|