Skip to content

Commit 059d858

Browse files
👷 Deploy docs.
1 parent df3bfc2 commit 059d858

File tree

7 files changed

+87
-35
lines changed

7 files changed

+87
-35
lines changed

‎.config/mise.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ check = 'ruff check'
88
format = 'ruff format'
99
install = 'poetry install --all-groups --all-extras'
1010
mkdocs = 'poetry run mkdocs build -f .config/mkdocs.yaml'
11-
mypy = 'mypy --python-executable "$(poetry env info -p)/bin/python" --hide-absolute-path'
11+
mkdocs-serve = 'poetry run mkdocs serve -f .config/mkdocs.yaml -a 0.0.0.0:8000'
12+
mypy = 'mypy --python-executable "$(poetry env info -p)/lib/python3.10/site-packages" --hide-absolute-path'

‎.config/mkdocs.yaml‎

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
copyright: Copyright © 2022-2025 RafaÅ‚ KrupiÅ„ski
1+
copyright: Copyright © 2022-2026 RafaÅ‚ KrupiÅ„ski
22
site_name: Lapidary
33
repo_url: https://github.com/python-lapidary/lapidary
44
repo_name: python-lapidary/lapidary
55
site_url: https://lapidary.github.io/lapidary
66
site_description: "Declarative Web API client for python"
77
site_dir: "../site"
8+
edit_uri: edit/main/docs/
89
watch:
910
- mkdocs.yaml
1011
- ../src
@@ -13,6 +14,7 @@ watch:
1314
docs_dir: ../docs
1415
exclude_docs: |
1516
adr
17+
theme
1618
1719
nav:
1820
- index.md
@@ -21,6 +23,7 @@ nav:
2123
- usage/operation.md
2224
- usage/auth.md
2325
- API reference: reference/api.md
26+
- Lapidary Render: https://lapidary.dev/lapidary-render
2427

2528
validation:
2629
omitted_files: warn
@@ -29,27 +32,31 @@ validation:
2932

3033

3134
theme:
35+
custom_dir: ../docs/theme
3236
name: material
3337
logo: assets/logo.svg
3438
icon:
3539
logo: assets/logo.svg
40+
repo: fontawesome/brands/git-alt
3641
favicon: assets/logo.svg
42+
repo_branch: main
43+
3744
features:
3845
- announce.dismiss
3946
- content.action.view
4047
- content.code.annotate
4148
- content.code.copy
4249
- content.tooltips
4350
- navigation.footer
51+
- navigation.instant
4452
- navigation.instant.preview
4553
- navigation.path
4654
- navigation.sections
47-
- navigation.tabs
48-
- navigation.tabs.sticky
4955
- navigation.top
5056
- search.highlight
5157
- search.suggest
5258
- toc.follow
59+
font: false
5360
palette:
5461
- media: "(prefers-color-scheme)"
5562
toggle:
@@ -105,7 +112,7 @@ plugins:
105112
python:
106113
inventories:
107114
- https://docs.python.org/3/objects.inv
108-
paths: [src]
115+
paths: [../src]
109116
options:
110117
backlinks: tree
111118
docstring_section_style: spacy
@@ -127,19 +134,10 @@ plugins:
127134
show_symbol_type_toc: true
128135
signature_crossrefs: true
129136
summary: true
130-
- llmstxt:
131-
full_output: llms-full.txt
132-
sections:
133-
Usage:
134-
- index.md
135-
API:
136-
- reference/api.md
137-
#- git-revision-date-localized:
138-
# enabled: !ENV [DEPLOY, false]
139-
# enable_creation_date: true
140-
# type: timeago
141137
- minify:
142138
minify_html: !ENV [DEPLOY, false]
139+
- privacy:
140+
enabled: true
143141

144142
extra:
145143
social:
@@ -150,14 +148,5 @@ extra:
150148
- icon: fontawesome/brands/python
151149
link: https://pypi.org/project/lapidary/
152150
analytics:
153-
feedback:
154-
title: Was this page helpful?
155-
ratings:
156-
- icon: material/emoticon-happy-outline
157-
name: This page was helpful
158-
data: 1
159-
note: Thanks for your feedback!
160-
- icon: material/emoticon-sad-outline
161-
name: This page could be improved
162-
data: 0
163-
note: Let us know how we can improve this page.
151+
provider: goatcounter
152+
code: lapidary

‎.devcontainer/Dockerfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM ghcr.io/astral-sh/uv:alpine
22

3-
RUN apk add mise git bash --no-cache
3+
RUN apk add mise git bash git ssh-client-default --no-cache
44

5-
RUN uv python install 3.14
5+
RUN uv python install 3.10
66

77
RUN \
88
echo 'eval "$(mise activate bash)"' >> ~/.bashrc &&\
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
{
2+
"appPort": [
3+
8000
4+
],
25
"build": {
36
"dockerfile": "Dockerfile"
47
},
5-
"remoteUser": "root",
6-
"remoteEnv": {
7-
"MISE_TRUSTED_CONFIG_PATHS": "/",
8-
},
8+
containerUser: "dev",
9+
postCreateCommand: "mise -c /workspaces/lapidary install",
910
postStartCommand: [
1011
"poetry install --all-groups --all-extras"
1112
],
12-
postCreateCommand: "mise -c /workspaces/lapidary install"
13+
"remoteEnv": {
14+
"MISE_TRUSTED_CONFIG_PATHS": "/"
15+
},
16+
runArgs: [
17+
"--userns=keep-id:uid=1000,gid=1000",
18+
// seems @devcontainers/cli doesn't like forwardPorts
19+
"-p",
20+
"8000:8000"
21+
],
22+
updateRemoteUserUID: true
1323
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and publish docs
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
mkdocs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v6
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Cache Poetry dependencies
22+
uses: actions/cache@v5
23+
with:
24+
path: |
25+
~/.cache/pypoetry
26+
~/.cache/pip
27+
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-poetry-
30+
31+
- name: Install dependencies
32+
run: |
33+
pip install poetry
34+
poetry install --no-root
35+
36+
- name: Build site
37+
run: poetry run mkdocs build -f .config/mkdocs.yaml
38+
39+
- name: Publish to org pages
40+
uses: peaceiris/actions-gh-pages@v4
41+
with:
42+
destination_dir: lapidary-runtime
43+
external_repository: python-lapidary/lapidary.dev
44+
personal_token: ${{ secrets.GH_PAT }}
45+
publish_branch: gh-pages
46+
publish_dir: site
47+
user_email: 'github-actions[bot]@users.noreply.github.com'
48+
user_name: 'github-actions[bot]'

‎.github/workflows/test_publish.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Test and publish
22

33
on:
4-
- push
4+
push:
5+
branches:
6+
- main
57

68
concurrency:
79
group: tests-${{ github.head_ref || github.ref }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<script data-goatcounter="https://{{ config.extra.analytics.code }}.goatcounter.com/count"
2+
async src="//gc.zgo.at/count.js"></script>

0 commit comments

Comments
 (0)