diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml deleted file mode 100644 index 707a3d954..000000000 --- a/.github/workflows/book.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Deploy Book -on: - push: - branches: - - main - paths: - - book/** - -jobs: - deploy: - if: github.repository == 'future-proof-iot/RIOT-rs' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - 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 docs - run: | - cd book - mdbook build - - name: Update gh-pages branch - # This has no reason to fail, only the commit step fails if there are no - # changes. - continue-on-error: true - run: | - cd book - git worktree add gh-pages gh-pages - git config user.name "Deploy from CI" - git config user.email "" - cd gh-pages - git rm -rf dev - mv ../book dev - git add dev - git commit -m "Deploy $GITHUB_SHA to gh-pages" - - name: Deploy changed book - # only deploy if there were changes - if: success() - run: | - cd book/gh-pages - git push --force diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/build-deploy-docs.yml similarity index 75% rename from .github/workflows/rustdoc.yml rename to .github/workflows/build-deploy-docs.yml index 9cb2edab7..98a8b0f1b 100644 --- a/.github/workflows/rustdoc.yml +++ b/.github/workflows/build-deploy-docs.yml @@ -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 @@ -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 "" > 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: diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 48e70eac5..4d6a6f756 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -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 . 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 diff --git a/README.md b/README.md index a87c51777..08ed9a65c 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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 @@ -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/