Skip to content

Commit ba4740f

Browse files
committed
feat: add GitHub Pages deployment workflow
- Add GitHub Actions workflow for automatic deployment - Create docs/requirements.txt for documentation dependencies - Remove mkdocs-jupyter plugin from mkdocs.yml - Remove docs/examples symlink to exclude .ipynb files from docs - Use latest action versions (v4, v5) to avoid deprecation warnings
1 parent 95de1f2 commit ba4740f

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.11'
25+
26+
- name: Cache pip dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.cache/pip
30+
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
31+
restore-keys: |
32+
${{ runner.os }}-pip-
33+
34+
- name: Install dependencies
35+
run: |
36+
pip install --upgrade pip
37+
pip install -r docs/requirements.txt
38+
39+
- name: Configure Git
40+
run: |
41+
git config user.name "github-actions[bot]"
42+
git config user.email "github-actions[bot]@users.noreply.github.com"
43+
44+
- name: Build and deploy to GitHub Pages
45+
run: mkdocs gh-deploy --force --clean

docs/examples

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mkdocs>=1.5.0
2+
mkdocs-material>=9.0.0
3+
mkdocstrings[python]>=0.24.0
4+
pymdown-extensions>=10.0
5+
mkdocs-shadcn>=0.1.0

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ plugins:
6767
min_search_length: 2
6868
prebuild_index: true
6969
indexing: 'full'
70-
- mkdocs-jupyter
7170
- mkdocstrings:
7271
handlers:
7372
python:

0 commit comments

Comments
 (0)