-
Notifications
You must be signed in to change notification settings - Fork 34
42 lines (32 loc) · 1.21 KB
/
doc.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
name: Publish Documentation
on:
push:
branches: [ master, staging, trying ]
jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
name: Install toolchain
with:
toolchain: nightly
target: thumbv7em-none-eabihf
override: true
- name: Generate BSP docs
run: cargo rustdoc --target thumbv7em-none-eabihf --all-features -- --cfg docsrs
- name: Generate FCB docs
run: cargo rustdoc --target thumbv7em-none-eabihf --package teensy4-fcb
- name: Generate panic docs
run: cargo rustdoc --target thumbv7em-none-eabihf --package teensy4-panic
- name: Generate pins docs
run: cargo rustdoc --target thumbv7em-none-eabihf --package teensy4-pins
- name: Write redirect
run: echo "<meta http-equiv=\"refresh\" content=\"0;url=teensy4_bsp\">" > target/thumbv7em-none-eabihf/doc/index.html
- name: Deploy to GitHub pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/thumbv7em-none-eabihf/doc
publish_branch: gh-pages