Skip to content

Commit 5bd23e0

Browse files
committed
Update MkDocs workflow and dependencies for improved documentation deployment
Enhanced the MkDocs GitHub Actions workflow by refining plugin installation and updating dependencies. Added the `mkdocstrings-python` and `mkdocs-git-revision-date-plugin` plugins for better functionality and streamlined `docs.yml` configuration.
1 parent 9034a86 commit 5bd23e0

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

.github/workflows/docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build & Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- '.github/workflows/docs.yml'
10+
workflow_dispatch:
11+
12+
jobs:
13+
docs:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install MkDocs & plugins
24+
run: |
25+
pip install \
26+
mkdocs mkdocs-material mkdocstrings mkdocstrings-python \
27+
mkdocs-git-revision-date-plugin mkdocs-jupyter pymdown-extensions
28+
29+
- name: Build site
30+
run: mkdocs build --strict
31+
32+
- name: Deploy to GitHub Pages
33+
uses: peaceiris/actions-gh-pages@v4
34+
with:
35+
github_token: ${{ secrets.GH_PAGES_TOKEN }}
36+
publish_dir: ./site

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ jobs:
7171
mkdocs \
7272
mkdocs-material \
7373
mkdocstrings \
74-
git-revision-date \
74+
mkdocstrings-python \
75+
mkdocs-git-revision-date-plugin \
7576
mkdocs-jupyter \
7677
pymdown-extensions
7778

0 commit comments

Comments
 (0)