Skip to content

Commit 29b3fab

Browse files
committed
Add GitHub Actions workflow for docs deployment
- Create docs.yaml workflow triggered on release or manual dispatch - Uses pdoc to generate API documentation - Deploys to GitHub Pages using native actions - Update README badges to point to fork CI and docs - Remove upstream Matrix chat references
1 parent 5f4452f commit 29b3fab

2 files changed

Lines changed: 58 additions & 5 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Docs
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v4
25+
26+
- name: Set up Python
27+
run: uv python install 3.11
28+
29+
- name: Install dependencies
30+
run: uv sync --extra dev
31+
32+
- name: Get version
33+
id: version
34+
run: echo "version=$(uv run python -c "import tomllib;print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")" >> $GITHUB_OUTPUT
35+
36+
- name: Build docs
37+
run: uv run pdoc -o docs --docformat google --no-search pykeepass '!pykeepass.icons' --footer-text "pykeepass ${{ steps.version.outputs.version }}"
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v4
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
# pykeepass
22

3-
<a href="https://github.com/libkeepass/pykeepass/actions/workflows/ci.yaml"><img src="https://github.com/libkeepass/pykeepass/actions/workflows/ci.yaml/badge.svg"/></a>
4-
<a href="https://libkeepass.github.io/pykeepass"><img src="https://readthedocs.org/projects/pykeepass/badge/?version=latest"/></a>
5-
<a href="https://matrix.to/#/%23pykeepass:matrix.org"><img src="https://img.shields.io/badge/chat-%23pykeepass-green"/></a>
3+
<a href="https://github.com/coreyleavitt/pykeepass/actions/workflows/ci.yaml"><img src="https://github.com/coreyleavitt/pykeepass/actions/workflows/ci.yaml/badge.svg"/></a>
4+
<a href="https://coreyleavitt.github.io/pykeepass"><img src="https://img.shields.io/badge/docs-pdoc-blue"/></a>
65

76
This library allows you to read and write KeePass databases (KDBX3 and KDBX4 formats).
87

9-
Come chat at [#pykeepass:matrix.org](https://matrix.to/#/%23pykeepass:matrix.org) on Matrix.
10-
118
# Installation
129

1310
Requires Python 3.11+

0 commit comments

Comments
 (0)