Skip to content

Commit 6d5d744

Browse files
authored
Implement a barebones CI for setup for the user docs. (#24)
Add a "build-test" Makefile target which executes a sphinx docs build with warnings turned into errors. Use this new target within a GitHub workflow such that the ability to build the docs is verified on each commit.
1 parent e70c13e commit 6d5d744

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/ci.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: User Docs
2+
3+
on:
4+
push
5+
6+
jobs:
7+
test-build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up latest stable Python 3.x
12+
uses: actions/setup-python@v5
13+
with:
14+
python-version: "3.x"
15+
- name: Install dependencies
16+
run: |
17+
make dependencies
18+
- name: Ensure the docs build
19+
run: |
20+
make test-build

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ dependencies: ./.venv/pyvenv.cfg ./requirements.txt
2020
./requirements.txt:
2121
@
2222

23+
.PHONY: test-build
24+
test-build: dependencies
25+
@$(SPHINXBUILD) -W "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
26+
2327
# Catch-all target: route all unknown targets to Sphinx using the new
2428
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
2529
.PHONY: Makefile

0 commit comments

Comments
 (0)