name: github pages

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  deploy:
    runs-on: ubuntu-20.04
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v2

      - name: Setup mdBook
        uses: peaceiris/actions-mdbook@v1
        with:
          mdbook-version: 'latest'
      - run: cargo install mdbook-mermaid
      - run: mdbook build docs/book/

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./docs/book/book

Add GitHub Action for mdbook
Add GitHub Action for mdbook

BUG=b:199688855
TEST=run at personal account

Change-Id: I7e44424deccf64be5fdf0d14d24109c3245e37c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3159885
Reviewed-by: Dennis Kempin <cd09796fb571bec2782819dbfd33307f65b1c778@google.com>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Commit-Queue: Keiichi Watanabe <815e4e8f7c92a23424d7c3f51ead622bcedbc720@chromium.org>
