Skip to content

Commit a0e0ef7

Browse files
authored
ProperDocs Compatibility (#4)
1 parent 5220cbf commit a0e0ef7

File tree

5 files changed

+53
-25
lines changed

5 files changed

+53
-25
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on:
55
branches:
66
- main
77
pull_request:
8+
types: ['opened', 'edited', 'reopened', 'synchronize', 'ready_for_review']
89
branches:
910
- '**'
1011

1112

1213
jobs:
1314
test:
15+
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
1416
strategy:
1517
max-parallel: 5
1618
matrix:
@@ -44,6 +46,7 @@ jobs:
4446
shell: bash
4547

4648
lint:
49+
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
4750
runs-on: ubuntu-latest
4851
steps:
4952
- uses: actions/checkout@v3

.github/workflows/deploy-docs.yml

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
1-
name: deploy
2-
on:
1+
name: deploy
2+
on:
33
push:
44
branches:
5-
- main
6-
permissions:
7-
contents: write
8-
jobs:
9-
deploy:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
5+
- main
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: github-pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
1322
with:
1423
fetch-depth: 0
15-
- name: Configure Git Credentials
16-
run: |
17-
git config user.name github-actions[bot]
18-
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
19-
- uses: actions/setup-python@v5
24+
- uses: actions/setup-python@v5
2025
with:
2126
python-version: 3.x
2227
cache: 'pip'
23-
- name: Install Python dependencies
24-
run: python -m pip install --upgrade hatch
25-
- name: Build and deploy
26-
run: hatch -e doc run mkdocs gh-deploy --force
28+
- name: Install dependencies
29+
run: pip install -r requirements.txt
30+
- name: Build
31+
run: properdocs build --clean
32+
- name: Upload static files as artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: ./site/
36+
37+
deploy:
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

mkdocs_data_plugin/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
version = "0.2.0"
1+
import properdocs.replacement_warning
2+
3+
properdocs.replacement_warning.setup()
4+
5+
version = "0.3.0"

mkdocs.yml renamed to properdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exclude_docs: |
1717
_*
1818
1919
theme:
20-
name: material
20+
name: materialx
2121
icon:
2222
logo: material/file-send-outline
2323
palette:

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ classifiers = [
1616
"Topic :: Software Development :: Libraries :: Python Modules",
1717
]
1818
dependencies = [
19-
"mkdocs>=1.5.2",
19+
"mkdocs>=1.5.2,<2.0",
20+
"properdocs>=1.6",
2021
"mkdocs-macros-plugin>=1.2.0",
2122
]
2223

@@ -63,17 +64,17 @@ type = ["default"]
6364

6465
[tool.hatch.envs.doc]
6566
dependencies = [
66-
"mkdocs-material[imaging]~=9.5",
67+
"mkdocs-materialx[imaging]~=10.1",
6768
"mkdocs-alias-plugin~=0.8",
6869
"mkdocs-git-revision-date-localized-plugin~=1.2",
6970
]
7071

7172
[tool.hatch.envs.doc.scripts]
7273
serve = [
73-
"mkdocs serve",
74+
"properdocs serve",
7475
]
7576
build = [
76-
"mkdocs build",
77+
"properdocs build",
7778
]
7879

7980
[tool.hatch.envs.style]

0 commit comments

Comments
 (0)