[book] Fix rendering issue in book with sidebar #218
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: generate documentation | |
run: cargo doc --no-deps | |
- name: generate book | |
run: | | |
cargo install mdbook | |
cd book/text | |
mdbook build | |
- name: prep deployment branch | |
if: github.ref == 'refs/heads/main' | |
run: | | |
mkdir -p dist | |
cp -r target/doc/* dist/ | |
cp -r book/text/book dist/ | |
cd dist | |
git init | |
git add -A | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m 'deploy' | |
- name: push deployment branch | |
uses: ad-m/[email protected] | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: ./dist |