mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
docs: add rustdoc to gh pages (#3104)
This commit is contained in:
21
.github/workflows/book.yml
vendored
21
.github/workflows/book.yml
vendored
@ -2,14 +2,8 @@ name: book
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'book/**'
|
||||
- 'book.toml'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'book/**'
|
||||
- 'book.toml'
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
@ -42,6 +36,12 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install toolchain
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
|
||||
- name: Install mdbook
|
||||
run: |
|
||||
mkdir mdbook
|
||||
@ -54,9 +54,16 @@ jobs:
|
||||
curl -sSL https://github.com/sgoudham/mdbook-template/releases/latest/download/mdbook-template-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-template
|
||||
echo `pwd`/mdbook-template >> $GITHUB_PATH
|
||||
|
||||
- name: Build
|
||||
- name: Build book
|
||||
run: mdbook build
|
||||
|
||||
- name: Build docs
|
||||
run: RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all --no-deps
|
||||
|
||||
- name: Move docs to book folder
|
||||
run: |
|
||||
mv target/doc target/book/docs
|
||||
|
||||
- name: Save pages artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user