Skip to content

Commit 21b41ce

Browse files
committed
doc: use mkdocs [docs].
1 parent ccbb921 commit 21b41ce

33 files changed

+586
-35
lines changed

.actrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# .actrc
2+
# This file is used by the `act` tool to define the Docker image to use for the GitHub Actions (local) runner.
3+
-P ubuntu-latest=catthehacker/ubuntu:act-22.04

.github/workflows/docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# .github/workflows/docs.yml
2+
name: Build and Deploy Documentation
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- "v*.*.*" # version branches like v1.0.1
9+
tags-ignore:
10+
- "**"
11+
paths-ignore:
12+
- "README.md"
13+
workflow_dispatch:
14+
# Optional: force build if commit message contains [docs]
15+
workflow_call:
16+
17+
jobs:
18+
build-docs:
19+
if: >
20+
contains(github.event.head_commit.message, '[docs]') ||
21+
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v'))
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout source
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.11'
32+
33+
- name: Install uv package manager
34+
run: |
35+
curl -LsSf https://astral.sh/uv/install.sh | sh
36+
echo "~/.cargo/bin" >> $GITHUB_PATH
37+
38+
- name: Install documentation dependencies
39+
run: |
40+
uv pip install --system -r requirements-docs.txt
41+
42+
- name: Build documentation
43+
run: |
44+
mkdocs build --strict
45+
46+
- name: Upload built site as artifact
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: site
50+
path: site/
51+
52+
# Optional: deploy to GitHub Pages
53+
# - name: Deploy to GitHub Pages
54+
# uses: peaceiris/actions-gh-pages@v4
55+
# with:
56+
# github_token: ${{ secrets.GITHUB_TOKEN }}
57+
# publish_dir: ./site
File renamed without changes.
File renamed without changes.
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
@ECHO OFF
2-
3-
pushd %~dp0
4-
5-
REM Command file for Sphinx documentation
6-
7-
if "%SPHINXBUILD%" == "" (
8-
set SPHINXBUILD=sphinx-build
9-
)
10-
set SOURCEDIR=source
11-
set BUILDDIR=build
12-
13-
if "%1" == "" goto help
14-
15-
%SPHINXBUILD% >NUL 2>NUL
16-
if errorlevel 9009 (
17-
echo.
18-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19-
echo.installed, then set the SPHINXBUILD environment variable to point
20-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21-
echo.may add the Sphinx directory to PATH.
22-
echo.
23-
echo.If you don't have Sphinx installed, grab it from
24-
echo.http://sphinx-doc.org/
25-
exit /b 1
26-
)
27-
28-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29-
goto end
30-
31-
:help
32-
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33-
34-
:end
35-
popd
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)