mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
Instead of install full dependencies with `install-deps` in GitHub action, minimize dependencies because we use GitHub only for document generation. - Passed `CARGO_DOC` environment when running cargo-doc command so we can skip unnecessary build flow when we just want to generate API docs. - Added a new script `install-docs-deps` to install only doc-related dependencies. BUG=none TEST=test on GitHub Action at my personal repository Change-Id: Ibe988ab43215e285d946812bdd6c1536ae87b50e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3578144 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Anton Romanov <romanton@google.com> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
37 lines
909 B
YAML
37 lines
909 B
YAML
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'
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt update
|
|
./tools/install-docs-deps
|
|
- name: Run mdbook
|
|
run: |
|
|
mkdir -p docs/target/
|
|
mdbook build docs/book/ --dest-dir ../target/
|
|
- name: Run cargo doc
|
|
run: |
|
|
git submodule update --init
|
|
./tools/cargo-doc --target-dir ./docs/target/html/
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./docs/target/html/
|