diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e74d14b..76e833d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,10 +77,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Setup mdBook - uses: peaceiris/actions-mdbook@v2 - with: - mdbook-version: '0.4.4' + - run: ./scripts/get-mdbook.sh - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: @@ -88,7 +85,7 @@ jobs: - name: Build run: cargo build --locked - name: Ensure that docs can be built - run: cd docs && mdbook build + run: ./mdbook build docs - name: Generate usage string run: cargo run --locked -- --help > docs/src/usage-actual.txt - name: Ensure that usage string is up to date diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..127a954 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,7 @@ + version: 2 + + build: + os: ubuntu-26.04 + commands: + - ./scripts/get-mdbook.sh + - ./mdbook build docs --dest-dir $READTHEDOCS_OUTPUT/html diff --git a/docs/book.toml b/docs/book.toml index ae63f23..025b3f1 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -1,6 +1,5 @@ [book] -authors = ["Danilo Bargen"] +authors = ["Danilo Bargen", "Niklas Mohrin"] language = "en" -multilingual = false src = "src" title = "Tealdeer User Manual" diff --git a/scripts/get-mdbook.sh b/scripts/get-mdbook.sh new file mode 100755 index 0000000..1d6c5a8 --- /dev/null +++ b/scripts/get-mdbook.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -ex + +wget -O mdbook.tar.gz https://github.com/rust-lang/mdBook/releases/download/v0.5.4/mdbook-v0.5.4-x86_64-unknown-linux-musl.tar.gz +echo "5222beabd3e37dc5be0d18ff99b79058469354db5c220153a1b92db5ba12be89 mdbook.tar.gz" > sha256sums +sha256sum --check sha256sums +tar xvf mdbook.tar.gz