From 8daaa390704ef5d77f4d9981c6288e561093bfec Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Wed, 20 Nov 2019 17:51:46 +0900 Subject: [PATCH] docs: Add mdbook example --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.md b/README.md index f1d3a93..589e840 100644 --- a/README.md +++ b/README.md @@ -621,6 +621,45 @@ jobs: PUBLISH_DIR: ./site ``` +### ⭐️ mdBook (Rust) + +```yaml +name: github pages + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + + - name: Setup mdbook + run: | + export MDBOOK_VERSION="v0.3.5" + wget "https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" + tar -zxvf "mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" + rm "mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" + mkdir ~/bin + mv ./mdbook ~/bin/ + echo "::add-path::~/bin" + + - run: mdbook build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v2.5.0 + env: + ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./book +``` + ## License