Skip to content

Commit ce89499

Browse files
authored
Merge pull request #1086 from kernelkit/doc
Switch from GitHub to MkDocs Material for documentation Signed-off-by: Joachim Wiberg <[email protected]> Signed-off-by: Jon-Olov Vatn <[email protected]>
2 parents 3d3a4ca + cf4a29d commit ce89499

40 files changed

+2578
-1956
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ on:
2424
default: kernelkit/infix
2525
type: string
2626

27-
2827
workflow_call:
2928
inputs:
3029
target:

.github/workflows/docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: User Guide Generator
2+
3+
on:
4+
push:
5+
branches:
6+
- doc
7+
- main
8+
tags:
9+
- 'v*'
10+
paths:
11+
- 'doc/**'
12+
- 'mkdocs.yml'
13+
- '.github/workflows/docs.yml'
14+
pull_request:
15+
types: [opened, synchronize, reopened, labeled]
16+
paths:
17+
- 'doc/**'
18+
- 'mkdocs.yml'
19+
- '.github/workflows/docs.yml'
20+
21+
permissions:
22+
contents: write
23+
24+
concurrency:
25+
group: "docs-${{ github.ref }}"
26+
cancel-in-progress: false
27+
28+
jobs:
29+
docs:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
37+
- name: Setup Python
38+
uses: actions/setup-python@v4
39+
with:
40+
python-version: '3.x'
41+
42+
- name: Install dependencies
43+
run: |
44+
pipx install mkdocs
45+
pipx inject mkdocs mkdocs-material
46+
pipx inject mkdocs pymdown-extensions
47+
pipx inject mkdocs mkdocs-callouts
48+
pipx inject mkdocs mike
49+
pipx inject mkdocs mkdocs-to-pdf
50+
# Workaround, if pipx inject fails to install symlink
51+
ln -s "$(pipx environment -V PIPX_LOCAL_VENVS)/mkdocs/bin/mike" \
52+
"$(pipx environment -V PIPX_BIN_DIR)/mike" || true
53+
54+
- name: Configure Git
55+
run: |
56+
git config --global user.name "github-actions[bot]"
57+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
58+
59+
- name: Deploy dev version
60+
if: github.event_name == 'push' && (github.ref == 'refs/heads/doc' || github.ref == 'refs/heads/main')
61+
run: |
62+
mike deploy --push --update-aliases dev latest
63+
mike set-default --push latest
64+
65+
- name: Deploy tagged version
66+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
67+
run: |
68+
TAG=${GITHUB_REF#refs/tags/v}
69+
# Extract YEAR.MONTH from tag (e.g., v25.06.0-beta1 -> 25.06)
70+
VERSION=$(echo $TAG | sed -E 's/^([0-9]+\.[0-9]+)(\.[0-9]+)?(-.*)?$/\1/')
71+
echo "Deploying tag $TAG as docs version $VERSION"
72+
mike deploy --push --update-aliases $VERSION latest
73+
mike set-default --push latest

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ different platforms, simplify long-term maintenance, and provide
88
made-easy management using NETCONF, RESTCONF[^2], or the built-in
99
command line interface (CLI) from a console or SSH login.
1010

11-
> Click the **▶ Example CLI Session** foldout below for an example, or
12-
> head on over to the [Infix Documentation](doc/README.md) for more
13-
> information on how to set up the system.
11+
> [!TIP]
12+
> _Curious how it works?_ Click the **▶ Example CLI Session** below to see
13+
> it in action
14+
> — or jump into the comprehensive [Infix Documentation][4] to learn even more.
1415
15-
Although primarily focused on switches and routers, the core values
16-
may be appealing for other use-cases as well:
16+
Geared for switches and routers — yet its core value fits plenty of
17+
other use cases:
1718

1819
- Runs from a squashfs image on a read-only partition
1920
- Single configuration file on a separate partition
@@ -95,6 +96,7 @@ The [following boards](board/aarch64/README.md) are fully supported:
9596
- Marvell CN9130 CRB
9697
- Marvell EspressoBIN
9798
- Microchip SparX-5i PCB135 (eMMC)
99+
- NXP i.MX8MP EVK
98100
- Raspberry Pi 4B
99101
- NanoPi R2S
100102

@@ -123,16 +125,17 @@ Environments](doc/virtual.md).
123125
[^1]: An immutable operating system is one with read-only file systems,
124126
atomic updates, rollbacks, declarative configuration, and workload
125127
isolation. All to improve reliability, scalability, and security.
126-
For more information, see <https://ceur-ws.org/Vol-3386/paper9.pdf>
127-
and <https://www.zdnet.com/article/what-is-immutable-linux-heres-why-youd-run-an-immutable-linux-distro/>.
128-
128+
For more information, see this [survey paper][5] and [article][6].
129129
[^2]: Partial RESTCONF support, features like HTTP PATCH, OPTIONS, HEAD,
130130
and copying between datastores are still missing.
131131

132-
[1]: https://buildroot.org/
133-
[2]: https://www.sysrepo.org/
132+
[1]: https://buildroot.org/ "Buildroot Homepage"
133+
[2]: https://www.sysrepo.org/ "Sysrepo Homepage"
134134
[3]: doc/cli/introduction.md
135-
[Latest Build]: https://github.com/kernelkit/infix/releases/tag/latest
135+
[4]: https://kernelkit.org/infix/ "Infix User's Guide"
136+
[5]: https://ceur-ws.org/Vol-3386/paper9.pdf "Immutable Operating Systems: A Survey"
137+
[6]: https://www.zdnet.com/article/what-is-immutable-linux-heres-why-youd-run-an-immutable-linux-distro/ "Why you should run an immutable Linux distro"
138+
[Latest Build]: https://github.com/kernelkit/infix/releases/tag/latest "Latest build"
136139
[License]: https://en.wikipedia.org/wiki/GPL_license
137140
[License Badge]: https://img.shields.io/badge/License-GPL%20v2-blue.svg
138141
[GitHub]: https://github.com/kernelkit/infix/actions/workflows/build.yml/

0 commit comments

Comments
 (0)