-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (36 loc) · 1.17 KB
/
build.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
name: Publish GitHub Pages
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build .tar.gz (sdist)
run: |
cd python
python -m pip install --upgrade build
python -m build --sdist
cp dist/*.tar.gz docs/source/_static
- name: Build docs
run: |
# Build GRPC files - they are required for generating the docs.
cd python
python -m pip install -r requirements.txt
python grpc_build_hook.py
cd docs
python -m pip install -r requirements.txt
# Configure SPHINXOPTS to treat warnings as errors
make html SPHINXOPTS='-W'
touch build/html/.nojekyll
- name: Publish docs to gh-pages branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: python/docs/build/html