Skip to content

Commit 2446e20

Browse files
authored
Merge pull request #62 from gmr/feature/docs-ci
Add docs build to CI and GitHub Pages deploy
2 parents 217013b + a7a16f4 commit 2446e20

2 files changed

Lines changed: 80 additions & 4 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- 'rejected/**'
10+
release:
11+
types: [published]
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v5
29+
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v6
32+
with:
33+
python-version: "3.13"
34+
35+
- name: Install dependencies
36+
run: uv sync --all-groups
37+
env:
38+
UV_CONFIG_FILE: /dev/null
39+
40+
- name: Build docs
41+
run: uv run mkdocs build --strict
42+
env:
43+
UV_CONFIG_FILE: /dev/null
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: site
49+
50+
deploy:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.github/workflows/testing.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,30 @@ on:
33
pull_request:
44
push:
55
branches: [main]
6-
paths-ignore:
7-
- 'docs/**'
8-
- '*.md'
9-
- '*.rst'
106
tags-ignore: ["*"]
117

128
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v5
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v6
17+
with:
18+
python-version: "3.13"
19+
20+
- name: Install dependencies
21+
run: uv sync --all-groups
22+
env:
23+
UV_CONFIG_FILE: /dev/null
24+
25+
- name: Build docs
26+
run: uv run mkdocs build --strict
27+
env:
28+
UV_CONFIG_FILE: /dev/null
29+
1330
test:
1431
runs-on: ubuntu-latest
1532
strategy:

0 commit comments

Comments
 (0)