From 767de9e9ab18b8127a6ada6ca8a9bedc248ad475 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 15 Nov 2024 14:43:25 -0800 Subject: [PATCH] output a single .md file: the entire book contents --- .github/workflows/mdbook.yml | 13 +++++++++++-- README.md | 2 +- book.toml | 2 ++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 2bc2fc3c..43d546a6 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -141,7 +141,7 @@ jobs: - uses: actions/checkout@v4 - name: Install mdBook run: | - cargo install --git https://github.com/nick1udwig/mdBook --branch hf/dont-write-searchindex-json --locked mdbook + cargo install --git https://github.com/nick1udwig/mdBook --branch hf/output-single-md-file --locked mdbook cargo install mdbook-linkcheck cargo install mdbook-webinclude cargo install --git https://github.com/nick1udwig/mdbook-hide-feature --locked @@ -166,7 +166,7 @@ jobs: release_name: Release ${{ github.run_number }} draft: false prerelease: false - - name: Upload Release Asset + - name: Upload Release Asset (.tar.gz) uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -175,6 +175,15 @@ jobs: asset_path: ./book.tar.gz asset_name: book.tar.gz asset_content_type: application/gzip + - name: Upload Release Asset (.md) + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./book/single-file/book.md + asset_name: book.md + asset_content_type: text/markdown deploy: environment: diff --git a/README.md b/README.md index 774d84cd..4679ece9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Get deps: ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -cargo install --git https://github.com/nick1udwig/mdBook --branch hf/dont-write-searchindex-json --locked mdbook +cargo install --git https://github.com/nick1udwig/mdBook --branch hf/output-single-md-file --locked mdbook cargo install mdbook-linkcheck cargo install mdbook-webinclude cargo install --git https://github.com/nick1udwig/mdbook-hide-feature --locked diff --git a/book.toml b/book.toml index f8aab01e..2ba38b99 100644 --- a/book.toml +++ b/book.toml @@ -19,6 +19,8 @@ level = 1 [output.linkcheck] +[output.single_file] + [preprocessor.webinclude] [preprocessor.hide-feature]