diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 269dedec3a..5889d011b9 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -18,11 +18,43 @@ jobs: uses: peaceiris/actions-mdbook@v1 with: mdbook-version: 'latest' - - run: cargo install mdbook-mermaid - - run: mdbook build docs/book/ - + - name: Install Dependencies + run: | + cargo install mdbook-mermaid + sudo apt update + sudo apt install -y \ + build-essential \ + clang \ + libasound2-dev \ + libcap-dev \ + libdbus-1-dev \ + libdrm-dev \ + libepoxy-dev \ + libssl-dev \ + libwayland-bin \ + libwayland-dev \ + ninja-build \ + pkg-config \ + protobuf-compiler \ + python3 \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + wayland-protocols + # Install meson for rutabaga_gfx + pip3 install meson + - name: Run mdbook + run: | + mkdir -p docs/target/ + mdbook build docs/book/ --dest-dir ../target/ + - name: Run cargo doc + run: | + git submodule update --init + # TODO audio_cras, chromeos, power-monitor-powerd + cargo doc --target-dir ./docs/target/ \ + --features "audio composite-disk default default-no-sandbox direct gdb gfxstream gpu plugin tpm usb video-decoder video-encoder virgl_renderer virgl_renderer_next wl-dmabuf x" - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/book/book + publish_dir: ./docs/target/ diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 39467d2698..210cb617d7 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -20,3 +20,7 @@ - [Sandboxing](./appendix/sandboxing.md) - [Seccomp](./appendix/seccomp.md) - [Minijail](./appendix/minijail.md) + +-------------------------------------------------------------------------------- + +[API Documentation](./api.md) diff --git a/docs/book/src/api.md b/docs/book/src/api.md new file mode 100644 index 0000000000..67c366515d --- /dev/null +++ b/docs/book/src/api.md @@ -0,0 +1,3 @@ +# API Document + +The API documentation generated by `cargo doc` is available [here](./doc/crosvm/).