Skip to content

Commit 92a8f79

Browse files
committed
use right command
1 parent 9d7c892 commit 92a8f79

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,44 @@ on:
44
push:
55
branches: ["main"]
66

7-
pull_request:
8-
branches: ["main"]
9-
107
# Allows you to run this workflow manually from the Actions tab
118
workflow_dispatch:
129

1310
permissions:
1411
contents: write
12+
pages: write
13+
id-token: write
1514

1615
jobs:
17-
docs:
16+
build:
1817
runs-on: ubuntu-latest
19-
env:
20-
IS_GITHUB_RUNNER: "true"
2118
steps:
2219
- uses: actions/checkout@v4
20+
2321
- uses: actions/setup-python@v5
2422
with:
2523
python-version: "3.12"
2624

27-
- name: Upgrade pip
28-
run: python -m pip install --upgrade pip
29-
3025
- name: Install dependencies
3126
run: |
3227
python -m pip install uv --upgrade
33-
python -m uv pip install --system "sphinx == 8.2.3" "sphinx-autodoc-typehints == 3.5.2" "sphinx-autobuild == 2025.8.25" "numpydoc == 1.10.0" "myst-parser == 4.0.1"
28+
python -m uv pip install --system .[docs]
3429
3530
- name: Sphinx build
36-
run: |
37-
sphinx-build -b html docs/ docs/_build/html -j auto
31+
run: sphinx-build -b html docs/ docs/_build/html -j auto
3832

39-
- name: Deploy to GitHub Pages
40-
uses: peaceiris/actions-gh-pages@v4
41-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
33+
- name: Upload pages artifact
34+
uses: actions/upload-pages-artifact@v3
4235
with:
43-
publish_branch: gh-pages
44-
github_token: ${{ secrets.GITHUB_TOKEN }}
45-
publish_dir: ./_build/html
46-
allow_empty_commit: true
47-
# force_orphan: true
36+
path: docs/_build/html
37+
38+
deploy:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)