Skip to content

Commit 76d9ea1

Browse files
committed
wip docs deploy
1 parent 321812e commit 76d9ea1

File tree

4 files changed

+68
-118
lines changed

4 files changed

+68
-118
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# .github/workflows/deploy.yml
2+
name: Deploy
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup PDM
14+
uses: pdm-project/setup-pdm@v4
15+
with:
16+
python-version: 3.12
17+
cache: true
18+
19+
- name: Install dependencies
20+
run: pdm install
21+
22+
- name: Build docs
23+
run: pdm docs
24+
25+
- uses: JamesIves/github-pages-deploy-action@v4
26+
with:
27+
folder: .
28+
branch: gh-pages
29+
clean-exclude: pr-preview
30+
force: false

.github/workflows/deploy-site.yml

Lines changed: 0 additions & 118 deletions
This file was deleted.

.github/workflows/preview-docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# .github/workflows/preview.yml
2+
name: Deploy PR previews
3+
concurrency: preview-${{ github.ref }}
4+
on:
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- synchronize
10+
- closed
11+
jobs:
12+
deploy-preview:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set base URL for preview if PR
17+
run: echo "DOCS_BASE_URL=https://${{ env.DOMAIN }}/${{ env.PR_PATH}}/" >> $GITHUB_ENV
18+
19+
- name: Setup PDM
20+
uses: pdm-project/setup-pdm@v4
21+
with:
22+
python-version: 3.12
23+
cache: true
24+
25+
- name: Install dependencies
26+
run: pdm install
27+
28+
- name: Build docs
29+
run: pdm docs
30+
if: github.event.action != 'closed'
31+
32+
- uses: rossjrw/pr-preview-action@v1
33+
with:
34+
source-dir: .
35+
preview-branch: gh-pages
36+
umbrella-dir: pr-preview
37+
action: auto

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
master_doc = "index"
2323

24+
2425
# -- General configuration
2526

2627
extensions = [

0 commit comments

Comments
 (0)