Skip to content

Commit fb324eb

Browse files
fix/doc-gha (Pipelex#94)
1 parent ea128fe commit fb324eb

3 files changed

Lines changed: 24 additions & 17 deletions

File tree

.github/workflows/deploy-doc.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
1-
# .github/workflows/docs-preview.yml
21
name: Preview MkDocs on GitHub Pages
32

43
on:
54
push:
6-
branches: [main]
5+
branches: main
6+
7+
permissions:
8+
contents: write
9+
pages: write
710

811
jobs:
912
preview:
1013
runs-on: ubuntu-latest
14+
env:
15+
VIRTUAL_ENV: ${{ github.workspace }}/.venv
1116
steps:
1217
- uses: actions/checkout@v4
1318

1419
- uses: actions/setup-python@v5
1520
with:
1621
python-version: '3.x'
1722

18-
- name: Build docs
19-
run: |
20-
pip install mkdocs==1.6.1 mkdocs-material==9.6.14 mkdocs-glightbox==0.4.0 mkdocs-meta-manager==1.1.0
21-
mkdocs build --strict # generates ./site
23+
- name: Check UV installation
24+
run: make check-uv
2225

23-
- name: Publish to *gh-pages-preview*
24-
uses: peaceiris/actions-gh-pages@v4
25-
with:
26-
github_token: ${{ secrets.GITHUB_TOKEN }}
27-
publish_dir: ./site
28-
publish_branch: gh-pages-preview # <─ test branch
29-
# put each branch in its own folder so multiple previews can coexist
30-
destination_dir: ${{ github.ref_name }}
31-
force_orphan: true
26+
- name: Verify UV installation
27+
run: uv --version
28+
29+
- name: Install dependencies
30+
run: make install
31+
32+
- name: Install docs dependencies
33+
run: uv pip install -e ".[docs]"
34+
35+
- name: Deploy documentation
36+
run: make doc-deploy

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,5 +401,5 @@ doc-check: env
401401

402402
doc-deploy: env
403403
$(call PRINT_TITLE,"Deploying documentation with mkdocs")
404-
$(VENV_MKDOCS) gh-deploy
404+
$(VENV_MKDOCS) gh-deploy --force --clean
405405

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ fal = ["fal-client>=0.4.1"]
5757
google = ["google-auth-oauthlib>=1.2.1"]
5858
mistralai = ["mistralai==1.5.2"]
5959
compat = ["backports.strenum>=1.3.0 ; python_version < '3.11'"]
60-
dev = [
60+
docs = [
6161
"mkdocs==1.6.1",
6262
"mkdocs-glightbox==0.4.0",
6363
"mkdocs-material==9.6.14",
6464
"mkdocs-meta-manager==1.1.0",
65+
]
66+
dev = [
6567
"boto3-stubs>=1.35.24",
6668
"mypy>=1.11.2",
6769
"pyright==1.1.398",

0 commit comments

Comments
 (0)