Skip to content

Commit 4c1d905

Browse files
committed
chore: add GitHub Actions workflow for deployment and update project configurations
1 parent feda2e6 commit 4c1d905

File tree

5 files changed

+89
-21
lines changed

5 files changed

+89
-21
lines changed

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [master]
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+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
cache: pip
27+
28+
- name: Install dependencies
29+
run: pip install -e .
30+
31+
- name: Build site
32+
run: zensical build
33+
34+
- uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: site/
37+
38+
deploy:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
steps:
45+
- id: deployment
46+
uses: actions/deploy-pages@v4

Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help install install-dev serve build deploy clean lint
1+
.PHONY: help install install-dev serve build clean lint
22

33
help:
44
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
@@ -11,17 +11,14 @@ install-dev:
1111
pip install -e ".[dev]"
1212

1313
serve:
14-
mkdocs serve
14+
zensical serve
1515

1616
build:
17-
mkdocs build --strict
18-
19-
deploy:
20-
mkdocs gh-deploy --force
17+
zensical build
2118

2219
clean:
2320
rm -rf site/
2421

2522
lint:
26-
mkdocs build --strict
23+
zensical build
2724
linkchecker site/index.html --check-extern --no-warnings

mkdocs.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
site_name: Papyrus Documentation
22
site_description: Cross-platform e-book management application
33
site_author: Papyrus
4-
site_url: https://papyrus.example.com/docs/
4+
site_url: https://papyrusreader.github.io/docs/
55
repo_name: Papyrus
6-
repo_url: https://github.com/Eoic/Papyrus
7-
edit_uri: edit/master/docs/src/
6+
repo_url: https://github.com/PapyrusReader/client
7+
edit_uri: edit/master/src/
88
docs_dir: src
99
site_dir: site
1010

@@ -49,8 +49,6 @@ theme:
4949
plugins:
5050
- search:
5151
separator: '[\s\-\.]+'
52-
- minify:
53-
minify_html: true
5452

5553
exclude_docs: |
5654
SUMMARY.md

pyproject.toml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@ readme = "README.md"
66
license = { text = "MIT" }
77
requires-python = ">=3.10"
88

9-
dependencies = [
10-
"mkdocs>=1.6",
11-
"mkdocs-material>=9.5",
12-
"mkdocs-minify-plugin>=0.8",
13-
"mkdocs-swagger-ui-tag>=0.6",
14-
"pymdown-extensions>=10.0",
15-
"pygments>=2.17",
16-
]
9+
dependencies = ["zensical>=0.0.24", "mkdocs-swagger-ui-tag>=0.6"]
1710

1811
[project.optional-dependencies]
19-
dev = ["mike>=2.1", "linkchecker>=10.0"]
12+
dev = ["linkchecker>=10.0"]
2013

2114
[build-system]
2215
requires = ["setuptools>=68.0"]

src/stylesheets/extra.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,32 @@
3434

3535
.md-header {
3636
background-color: var(--md-primary-fg-color);
37+
color: var(--md-primary-bg-color);
38+
}
39+
40+
.md-header .md-icon,
41+
.md-header .md-header__button {
42+
color: var(--md-primary-bg-color);
43+
}
44+
45+
.md-header__topic {
46+
color: var(--md-primary-bg-color);
47+
}
48+
49+
.md-search__button {
50+
color: var(--md-primary-bg-color);
51+
}
52+
53+
.md-header .md-search__icon svg,
54+
.md-header .md-search__button svg {
55+
fill: var(--md-primary-bg-color);
56+
}
57+
58+
.md-header a:hover,
59+
.md-header .md-header__topic:hover,
60+
.md-header .md-search__button:hover {
61+
color: var(--md-primary-bg-color);
62+
opacity: 0.8;
3763
}
3864

3965
.swagger-ui-wrap {
@@ -96,4 +122,12 @@
96122
[data-md-color-scheme="slate"] .swagger-ui .highlight-code,
97123
[data-md-color-scheme="slate"] .swagger-ui pre {
98124
filter: invert(100%) hue-rotate(180deg);
125+
}
126+
127+
.md-header .md-search__button::before {
128+
background-color: white;
129+
}
130+
131+
.md-header .md-search__button::after {
132+
background-color: hsla(var(--md-hue), 15%, 5%, 0.54);
99133
}

0 commit comments

Comments
 (0)