Skip to content

Commit 48b43e0

Browse files
committed
Build documentation with sphinx
This is basically copied verbatim from azafea. The only missing part is the Read the Docs integration.
1 parent f1ac530 commit 48b43e0

4 files changed

Lines changed: 342 additions & 4 deletions

File tree

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
/build
1010
/dist
1111
/Dockerfile
12-
/docs

.github/workflows/tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ jobs:
5454
- name: Lint and Type Checking
5555
run: docker run --rm --entrypoint="" amp pipenv run lint
5656

57+
doc:
58+
name: Documentation Building Test
59+
needs: build
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v2
63+
- name: Get Docker Image
64+
uses: actions/download-artifact@v2
65+
with:
66+
name: image
67+
- name: Load Docker Image
68+
run: docker load < docker-image.tar
69+
- name: Build Documentation
70+
run: docker run --rm --entrypoint="" --user=0:0 amp pipenv run doc -nW --keep-going
71+
5772
push:
5873
name: Upload the Docker image to Docker Hub
5974
runs-on: ubuntu-latest

Pipfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pytest-aiohttp = "~= 0.3"
1010
pytest-cov = "*"
1111
pytest-flake8 = "*"
1212
pytest-mypy = ">=0.3.3"
13+
sphinx = "*"
1314

1415
[packages]
1516
aiohttp = ">= 3.5.0"
@@ -18,6 +19,7 @@ pydantic = "~= 1.1"
1819
toml = "*"
1920

2021
[scripts]
22+
doc = "sphinx-build -b html docs/source docs/build/html"
2123
lint = "py.test --flake8 --mypy -m 'flake8 or mypy'"
2224
proxy = "python -m azafea_metrics_proxy"
2325
test = "py.test --cov=azafea_metrics_proxy --cov-fail-under=99 --no-cov-on-fail -m 'not integration'"

0 commit comments

Comments
 (0)