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
57 changes: 57 additions & 0 deletions .github/workflows/docs_builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "📚 Documentation Builder"

on:
push:
branches:
- master
- docs
paths:
- .github/workflows/docs_builder.yml
- qfieldcloud_sdk/**/*.py
- docs/**/*
tags:
- "*"

pull_request:
branches:
- master
paths:
- .github/workflows/docs_builder.yml
- qfieldcloud_sdk/**/*.py
- docs/**/*

# Allow one concurrent deployment
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-docs:

runs-on: ubuntu-24.04

steps:
- name: Get source code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install QFieldCloud SDK
run: python -m pip install -e .[docs]

- name: Build documentation
run: mkdocs build -f docs/mkdocs.yml

- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: docs
path: docs/site
if-no-files-found: error

- name: Deploy to GitHub Pages
if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
working-directory: docs
run: mkdocs gh-deploy --force
3 changes: 3 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# API documentation

::: qfieldcloud_sdk.sdk
14 changes: 14 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
site_name: QFieldCloud SDK Documentation

theme:
name: "material"

plugins:
- mkdocstrings

markdown_extensions:
- admonition
- codehilite

nav:
- qfieldcloud_sdk: index.md
17 changes: 13 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ build-backend = "setuptools.build_meta"
requires-python = ">=3.8"
name = "qfieldcloud-sdk"
description = "The official QFieldCloud SDK and CLI."
readme = "README.md"
authors = [{ name = "Ivan Ivanov", email = "ivan@opengis.ch" }]
authors = [
{ name = "Ivan Ivanov", email = "ivan@opengis.ch" },
]
license = { file = "LICENSE" }
keywords = ["QFieldCloud", "QField", "QGIS", "CI", "SDK"]
keywords = ["QFieldCloud", "QField", "QGIS", "CI", "SDK", "CLI"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: System Administrators",
Expand All @@ -29,7 +30,14 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: GIS",
]
dynamic = ["dependencies", "version"]
dynamic = ["dependencies", "readme", "version"]

[project.optional-dependencies]
docs = [
"mkdocstrings[python]~=0.25",
"mkdocs-material~=9.5.17",
"fancyboxmd~=1.1"
]

[project.scripts]
qfieldcloud-cli = "qfieldcloud_sdk.cli:cli"
Expand All @@ -44,6 +52,7 @@ tracker = "https://github.com/opengisch/qfieldcloud-sdk-python/issues"
packages = ["qfieldcloud_sdk"]

[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
dependencies = { file = ["requirements.txt"] }

[tool.setuptools-git-versioning]
Expand Down
Loading