Issue 430 added --no-confirm command (#431) #122
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: documentation | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
generate_documentation: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- 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 Python API documentation. | |
run: | | |
pip install 'maturin>=0.14,<0.15' virtualenv pdoc3 | |
virtualenv venv | |
source venv/bin/activate | |
maturin develop -m python/Cargo.toml | |
pdoc --html pravega_client | |
mkdir -p book/book/python | |
cp html/pravega_client/pravega_client.html book/book/python | |
- 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/ |