Skip to content

Commit

Permalink
ci(docs): merge the book and rustdoc workflows
Browse files Browse the repository at this point in the history
This is required to deploy as a single website, using the GitHub Pages
Action.
  • Loading branch information
ROMemories committed Apr 10, 2024
1 parent 3ab65c8 commit 4e76f96
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 53 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/book.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy rustdoc
name: Deploy docs

# GitHub Action workflow documentation:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
Expand Down Expand Up @@ -46,14 +46,26 @@ jobs:

- name: Build rustdoc docs
run: |
cargo rustdoc -p riot-rs --features no-boards,bench -- -D warnings
cargo doc -p riot-rs --features no-boards,bench
echo "<meta http-equiv=\"refresh\" content=\"0; url=riot_rs\">" > target/doc/index.html
mkdir -p ./dev/docs/api && mv target/doc/* ./dev/docs/api
mkdir -p ./_site/dev/docs/api && mv target/doc/* ./_site/dev/docs/api
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build the book
run: |
cd book
mdbook build
mv book ../_site/dev/docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dev/docs/api
path: ./_site

deploy:
environment:
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ affect a person's ability to participate within them.

If you believe someone is violating the code of conduct, we ask that you report
it by emailing <conduct@riot-rs.org>. For more details please see our [Reporting
Guidelines](https://future-proof-iot.github.io/RIOT-rs/dev/COC_reporting.html).
Guidelines](https://future-proof-iot.github.io/RIOT-rs/dev/docs/book/COC_reporting.html).

- **Be friendly and patient.**
- **Be welcoming.** We strive to be a community that welcomes and supports
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RIOT-rs is an operating system for secure, memory-safe, low-power Internet of Things (IoT).
RIOT-rs is based on Rust from the ground up, and uses formal verification
for critical modules. To learn more about our motivations, see this
[manifesto](https://future-proof-iot.github.io/RIOT-rs/dev/manifesto.html).
[manifesto](https://future-proof-iot.github.io/RIOT-rs/dev/docs/book/manifesto.html).

Hardware targets include varieties of IoT hardware based on
32-bit microcontroller architectures (such as Cortex-M, RISC-V).
Expand Down Expand Up @@ -113,7 +113,7 @@ recommended to use a current nightly.
## Coding Conventions

Please see the chapter on
[coding conventions](https://future-proof-iot.github.io/RIOT-rs/dev/coding-conventions.html)
[coding conventions](https://future-proof-iot.github.io/RIOT-rs/dev/docs/book/coding-conventions.html)
in the documentation.

## Copyright & License
Expand Down Expand Up @@ -141,4 +141,4 @@ be dual licensed as above, without any additional terms or conditions.
[matrix-badge]: https://img.shields.io/badge/chat-Matrix-brightgreen.svg
[matrix-link]: https://matrix.to/#/#RIOT-rs:matrix.org
[doc-badge]: https://img.shields.io/badge/Documentation-%F0%9F%93%94-blue
[documentation-mdbook]: https://future-proof-iot.github.io/RIOT-rs/dev/
[documentation-mdbook]: https://future-proof-iot.github.io/RIOT-rs/dev/docs/book/

0 comments on commit 4e76f96

Please sign in to comment.