-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (38 loc) · 1.23 KB
/
documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: documentation
on:
push:
branches:
- master
jobs:
generate_documentation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
# This copy the Nodejs README to the book source
- run: cp nodejs/README.md book/src/Nodejs/NodejsBindings.md
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.5"
# This generates the book inside ./book/book
- run: mdbook build book
# Build the cargo doc and copy it to ./book/book/doc
- name: Build the doc
run: |
cargo doc --no-deps
cp -r target/doc book/book/doc
echo "<meta http-equiv=refresh content=0;url=pravega_client/index.html>" > book/book/doc/index.html
- name: Generate Pravega Nodejs API documentation.
run: |
cd nodejs && npm i && cd ..
cd nodejs && npx typedoc *.ts && cd ..
mkdir -p book/book/nodejs
cp -r nodejs/docs/* book/book/nodejs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book/