mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
CI: Store and reuse API docs
This commit is contained in:
parent
5ca63f08d6
commit
b621bcf36a
1 changed files with 21 additions and 0 deletions
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
|
@ -353,9 +353,21 @@ jobs:
|
||||||
lychee --offline --format detailed $td/api/rtic_monotonics/
|
lychee --offline --format detailed $td/api/rtic_monotonics/
|
||||||
lychee --offline --format detailed $td/api/rtic_time/
|
lychee --offline --format detailed $td/api/rtic_time/
|
||||||
|
|
||||||
|
- name: Archive the API docs
|
||||||
|
run: |
|
||||||
|
cp -r target/doc apidocs
|
||||||
|
tar -cf apidocs.tar apidocs
|
||||||
|
|
||||||
|
- name: Store the API docs
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: apidocs
|
||||||
|
path: apidocs.tar
|
||||||
|
|
||||||
# Build the books
|
# Build the books
|
||||||
mdbook:
|
mdbook:
|
||||||
name: build mdbook
|
name: build mdbook
|
||||||
|
needs: docs
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -380,12 +392,21 @@ jobs:
|
||||||
shell: 'script --return --quiet --command "bash {0}"'
|
shell: 'script --return --quiet --command "bash {0}"'
|
||||||
run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi
|
run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi
|
||||||
|
|
||||||
|
- name: Download built API docs
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: apidocs
|
||||||
|
|
||||||
|
- name: Extract the API docs
|
||||||
|
run: tar -xf apidocs
|
||||||
|
|
||||||
- name: Check links
|
- name: Check links
|
||||||
run: |
|
run: |
|
||||||
td=$(mktemp -d)
|
td=$(mktemp -d)
|
||||||
mkdir $td/book
|
mkdir $td/book
|
||||||
cp -r book/en/book $td/book/en
|
cp -r book/en/book $td/book/en
|
||||||
cp LICENSE-* $td/book/en
|
cp LICENSE-* $td/book/en
|
||||||
|
cp -r apidocs/ $td/api
|
||||||
|
|
||||||
lychee --offline --format detailed $td/book/en/
|
lychee --offline --format detailed $td/book/en/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue