Skip to content

Commit 723d3bb

Browse files
committed
Add workflow to generate docs
1 parent 6cd5b72 commit 723d3bb

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches: [main, trying]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: pages
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
env:
16+
RUSTDOCFLAGS: -D warnings
17+
steps:
18+
- uses: actions/checkout@v6
19+
- run: rustup toolchain install stable --no-self-update --profile minimal --target thumbv7em-none-eabihf
20+
- name: Build documentation
21+
run: cargo rustdoc --target thumbv7em-none-eabihf --features=imxrt-ral/imxrt1062,smoltcp/socket-udp
22+
- name: Add redirect to root
23+
run: echo '<meta http-equiv="refresh" content="0; url=imxrt_enet">' > target/thumbv7em-none-eabihf/doc/index.html
24+
- name: Upload pages artifact
25+
uses: actions/upload-pages-artifact@v4
26+
with:
27+
path: target/thumbv7em-none-eabihf/doc
28+
29+
deploy:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
permissions:
33+
pages: write
34+
id-token: write
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)