Skip to content

Commit dc61e86

Browse files
committed
working dashboard with docs
1 parent e18f029 commit dc61e86

45 files changed

Lines changed: 860 additions & 409 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,20 @@ jobs:
2323
steps:
2424
- name: Checkout
2525
uses: actions/checkout@v4
26+
- name: Setup Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.x'
30+
- name: Install mkdocs
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install mkdocs mkdocs-material
34+
- name: Build docs with MkDocs
35+
run: mkdocs build -d site
2636
- name: Upload artifact
2737
uses: actions/upload-pages-artifact@v3
2838
with:
29-
path: docs
39+
path: site
3040

3141
deploy:
3242
environment:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ go.work
2424
.idea
2525
tests/logs
2626
logs
27-
openapi_token
27+
openapi_token
28+
site/

Makefile

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,27 @@ release: lint test
7272
clean:
7373
rm -rf ${DIRBASE}/*
7474

75-
.PHONY: all freebsd linux windows docker dep lint test security-tests linux-on-darwin-with-cgo-with-tests release clean
75+
.PHONY: all freebsd linux windows docker dep lint test security-tests linux-on-darwin-with-cgo-with-tests release clean
76+
77+
# --- Docs helpers -----------------------------------------------------------
78+
.PHONY: docs-serve docs-build
79+
80+
# Serve docs locally on http://127.0.0.1:8001
81+
# Prefer MkDocs if installed and mkdocs.yml exists; otherwise, serve static docs/
82+
docs-serve:
83+
@if command -v mkdocs >/dev/null 2>&1 && [ -f mkdocs.yml ]; then \
84+
echo "[docs] Serving with MkDocs on http://127.0.0.1:8001"; \
85+
mkdocs serve -a 127.0.0.1:8001 || (echo "[docs] MkDocs failed to serve. Falling back to static server" && python3 -m http.server -d docs 8001); \
86+
else \
87+
echo "[docs] MkDocs not found. Serving static docs/ via Python http.server on http://127.0.0.1:8001"; \
88+
python3 -m http.server -d docs 8001; \
89+
fi
90+
91+
# Build static site using MkDocs (outputs to site/) if available; otherwise no-op
92+
docs-build:
93+
@if command -v mkdocs >/dev/null 2>&1 && [ -f mkdocs.yml ]; then \
94+
echo "[docs] Building MkDocs site into ./site"; \
95+
mkdocs build -d site; \
96+
else \
97+
echo "[docs] MkDocs not installed; skipping build. (Install: pip install mkdocs mkdocs-material)"; \
98+
fi

0 commit comments

Comments
 (0)