-
-
Notifications
You must be signed in to change notification settings - Fork 346
47 lines (41 loc) · 1.28 KB
/
book.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Rust docs and WASM app
on:
push:
branches:
- main
- wasm_ci # TODO tmp
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: Install wasm-pack
uses: jetli/[email protected]
- 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: Built LTN app for web
run: |
cd web
sed -i 's/^APPS=.*/APPS=ltn/' Makefile
npm i
make release
cp -Rv build/dist ../book/book/web/
- name: Publish HTML
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book/