Skip to content

Commit 7f114d3

Browse files
Fix MkDocs dependencies and add GitHub Pages deployment workflow
1 parent 58ac9d6 commit 7f114d3

File tree

2 files changed

+81
-2
lines changed

2 files changed

+81
-2
lines changed

.github/workflows/docs.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
paths:
9+
- 'docs/**'
10+
- 'mkdocs.yml'
11+
- 'pyproject.toml'
12+
- '.github/workflows/docs.yml'
13+
workflow_dispatch: # Allow manual triggering
14+
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: false
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: '3.11'
37+
38+
- name: Install Poetry
39+
uses: snok/install-poetry@v1
40+
with:
41+
version: latest
42+
virtualenvs-create: true
43+
virtualenvs-in-project: true
44+
45+
- name: Load cached venv
46+
id: cached-poetry-dependencies
47+
uses: actions/cache@v4
48+
with:
49+
path: .venv
50+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
51+
52+
- name: Install dependencies
53+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
54+
run: poetry install --no-interaction --no-root
55+
56+
- name: Install project
57+
run: poetry install --no-interaction
58+
59+
- name: Build MkDocs
60+
run: poetry run mkdocs build
61+
62+
- name: Setup Pages
63+
uses: actions/configure-pages@v5
64+
65+
- name: Upload artifact
66+
uses: actions/upload-pages-artifact@v3
67+
with:
68+
path: ./site
69+
70+
deploy:
71+
environment:
72+
name: github-pages
73+
url: ${{ steps.deployment.outputs.page_url }}
74+
runs-on: ubuntu-latest
75+
needs: build
76+
steps:
77+
- name: Deploy to GitHub Pages
78+
id: deployment
79+
uses: actions/deploy-pages@v4

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ python = ">=3.9,<=3.12"
1414
pyarrow = ">=11.0.0"
1515
requests = "^2.31.0"
1616
faker = "^23.1.0"
17-
mkdocstrings = {extras = ["python"], version = "^0.24.0"}
17+
mkdocstrings = {extras = ["python"], version = "^0.28.0"}
1818
datasets = {version = "^2.17.0", optional = true}
1919
databricks-sdk = {version = "^0.28.0", optional = true}
2020
kagglehub = {extras = ["pandas-datasets"], version = "^0.3.10", optional = true}
@@ -32,7 +32,7 @@ pytest = "^8.0.0"
3232
grpcio = "^1.60.1"
3333
grpcio-status = "^1.60.1"
3434
pandas = "^2.2.0"
35-
mkdocs-material = "^9.5.9"
35+
mkdocs-material = "^9.5.40"
3636

3737
[build-system]
3838
requires = ["poetry-core"]

0 commit comments

Comments
 (0)