Skip to content

Commit 85f4329

Browse files
committed
Fix gh-pages deployment permission issue
- Add contents: write permission for pushing to gh-pages branch - Replace mkdocs gh-deploy with peaceiris/actions-gh-pages action - Split documentation build and deploy into separate steps for better reliability
1 parent eaf2a91 commit 85f4329

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
permissions:
1313
# IMPORTANT: this permission is mandatory for trusted publishing
1414
id-token: write
15+
# Required for pushing to gh-pages branch
16+
contents: write
1517

1618
steps:
1719
- uses: actions/checkout@v5
@@ -32,8 +34,14 @@ jobs:
3234
- name: Publish package distributions to PyPI
3335
uses: pypa/gh-action-pypi-publish@release/v1
3436

35-
- name: Publish Documentation
37+
- name: Build Documentation
3638
run: |
3739
pip install -r requirements-docs.txt
3840
pip install -e .
39-
mkdocs gh-deploy --force
41+
mkdocs build
42+
43+
- name: Deploy to GitHub Pages
44+
uses: peaceiris/actions-gh-pages@v4
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./site

0 commit comments

Comments
 (0)