Skip to content

Commit 23c8506

Browse files
authored
Fix #11: Publish docbuild documentation (#14)
Add a workflow file that publishes the docbuild documentation to GitHub pages.
1 parent 5751d5b commit 23c8506

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Deploy Sphinx Docs
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- 'docs/**'
10+
- '.github/workflows/gh-pages.yml'
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install the latest version of uv
21+
id: setup-uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
version: "latest"
25+
enable-cache: true
26+
cache-suffix: "docbuild"
27+
28+
- name: Print the installed version
29+
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
30+
31+
- name: Install dependencies
32+
run: uv sync --frozen --group docs
33+
34+
- name: Build documentation
35+
run: |
36+
uv run make -C docs html
37+
38+
- name: Deploy to GitHub Pages
39+
uses: peaceiris/actions-gh-pages@v4
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: docs/build/html
43+
44+
- name: Print documentation URL
45+
run: |
46+
echo "Your documentation will be available at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/"

0 commit comments

Comments
 (0)