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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
|
||||||
- 'book/**'
|
|
||||||
- 'book.toml'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
|
||||||
- 'book/**'
|
|
||||||
- 'book.toml'
|
|
||||||
merge_group:
|
merge_group:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -42,6 +36,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
cache-on-failure: true
|
||||||
|
|
||||||
- name: Install mdbook
|
- name: Install mdbook
|
||||||
run: |
|
run: |
|
||||||
mkdir mdbook
|
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
|
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
|
echo `pwd`/mdbook-template >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Build
|
- name: Build book
|
||||||
run: mdbook build
|
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
|
- name: Save pages artifact
|
||||||
uses: actions/upload-pages-artifact@v1
|
uses: actions/upload-pages-artifact@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user