Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build documentation

on:
push:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

# Default to bash
defaults:
run:
shell: bash

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
pipx install hatch
hatch env create
- name: Build
run: hatch run docs-build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "README.md"
6 changes: 6 additions & 0 deletions docs/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reference

::: pythonkuma
options:
show_root_heading: false
show_source: false
69 changes: 69 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
site_name: pythonkuma
site_description: Simple Python wrapper for Uptime Kuma

repo_url: https://github.com/tr4nt0r/pythonkuma
repo_name: tr4nt0r/pythonkuma

theme:
name: material
icon:
logo: material/library
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: pink
accent: purple
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: pink
accent: purple
toggle:
icon: material/brightness-4
name: Switch to light mode

markdown_extensions:
- toc:
permalink: true
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences

plugins:
- search
- mkdocstrings:
handlers:
python:
paths: [src]
import:
- https://docs.python.org/3.12/objects.inv
options:
docstring_style: numpy
merge_init_into_class: false
show_signature: false
members_order: source


watch:
- docs
- pythonkuma

nav:
- About: index.md
- Reference:
- pythonkuma: reference.md
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ dev = [
"aiohttp==3.12.12",
"prometheus-client==0.22.1",
"mashumaro==3.16",
"mkdocs-material==9.6.9",
"mkdocstrings[python]==0.29.0",
]

[project.urls]
Source = "https://github.com/tr4nt0r/pythonkuma"
Documentation = "https://tr4nt0r.github.io/pythonkuma"

[tool.hatch.version]
source = "regex_commit"
Expand Down Expand Up @@ -66,4 +69,8 @@ pythonpath = ["pythonkuma"]
extra-dependencies = [
"pythonkuma[dev]",
"pytest-cov==6.1.1",
]
]

[tool.hatch.envs.default.scripts]
docs-serve = "mkdocs serve"
docs-build = "mkdocs build"
Loading