Skip to content

Commit 0690e5a

Browse files
committed
ci(docs): add docs setup
1 parent 709829c commit 0690e5a

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/ci.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,29 @@ jobs:
5858
run: |
5959
source venv/bin/activate
6060
python3.10 -m mypy .
61+
62+
docs:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v1
66+
- name: Set up Python
67+
uses: actions/setup-python@v1
68+
with:
69+
python-version: "3.10"
70+
- name: Install dependencies
71+
run: |
72+
python3.10 -m venv venv
73+
source venv/bin/activate
74+
pip3 install --upgrade pip
75+
python3.10 -m pip install -r requirements.txt
76+
python3.10 setup.py install
77+
- name: Generate Reference Docs
78+
run: |
79+
source venv/bin/activate
80+
mkdir ./docs/build
81+
./docs/generate.sh --out=./docs/build/ --pypath=src/
82+
- uses: actions/upload-artifact@v3
83+
name: Upload Docs Preview
84+
with:
85+
name: reference-docs
86+
path: ./docs/build/

docs/generate.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Copyright 2022 Google Inc.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -96,6 +96,7 @@ mkdir _build
9696
cat >conf.py <<EOL
9797
import devsite_translator.html
9898
99+
exclude_patterns = ['venv/**']
99100
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
100101
source_suffix = '.rst'
101102
master_doc = 'index'

0 commit comments

Comments
 (0)