Skip to content

Commit 722e4ff

Browse files
committed
refactor: move docs commands to Makefile for consistency
1 parent d111ce3 commit 722e4ff

File tree

4 files changed

+38
-21
lines changed

4 files changed

+38
-21
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,15 @@ jobs:
3131

3232
- name: Install dependencies
3333
run: |
34-
python -m pip install --upgrade pip
35-
pip install mkdocs-material
3634
sudo apt-get update
3735
sudo apt-get install -y doxygen
36+
make install-deps
3837
3938
- name: Build API documentation with Doxygen
40-
run: |
41-
cd mkdocs
42-
mkdir -p docs/api
43-
doxygen Doxyfile
44-
echo "Doxygen output created in docs/api/"
39+
run: make build-api-docs
4540

4641
- name: Build docs
47-
run: |
48-
cd mkdocs
49-
mkdocs build --clean
50-
echo "MkDocs site built in site/"
42+
run: make build-docs
5143

5244
- name: Deploy to gh-pages
5345
if: github.event_name == 'pull_request'

Makefile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.PHONY: help install-deps build-api-docs build-docs clean-docs serve-docs
2+
3+
help:
4+
@echo "Available targets:"
5+
@echo " install-deps - Install Python dependencies"
6+
@echo " build-api-docs - Build API documentation with Doxygen"
7+
@echo " build-docs - Build MkDocs documentation"
8+
@echo " clean-docs - Clean documentation build artifacts"
9+
@echo " serve-docs - Serve documentation locally for development"
10+
@echo " all - Build all documentation"
11+
12+
install-deps:
13+
python -m pip install --upgrade pip
14+
pip install -r requirements.txt
15+
16+
build-api-docs:
17+
cd mkdocs && \
18+
mkdir -p docs/api && \
19+
doxygen Doxyfile && \
20+
echo "Doxygen output created in docs/api/"
21+
22+
build-docs:
23+
cd mkdocs && \
24+
mkdocs build --clean && \
25+
echo "MkDocs site built in site/"
26+
27+
clean-docs:
28+
rm -rf mkdocs/site
29+
rm -rf mkdocs/docs/api
30+
31+
serve-docs:
32+
cd mkdocs && mkdocs serve
33+
34+
all: build-api-docs build-docs

mkdocs/docs/index.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,6 @@ Run specific test:
117117
ctest --test-dir build -R test_name
118118
```
119119

120-
#### Test Coverage
121-
122-
We aim for high test coverage. Run tests with coverage:
123-
124-
```bash
125-
cmake -S . -B build -DICEBERG_BUILD_COVERAGE=ON
126-
cmake --build build
127-
ctest --test-dir build
128-
```
129-
130120
### Linting
131121

132122
Install the python package `pre-commit` and run once `pre-commit install`:

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
meson==1.3.0
22
ninja==1.13.0
3+
mkdocs-material>=9.4.0,<10.0.0

0 commit comments

Comments
 (0)