Skip to content

Commit 8d4a67e

Browse files
committed
Deploy docs via official GitHub Pages actions instead of a PAT
The Sphinx-docs deploy used peaceiris/actions-gh-pages with a DOCSITE_TOKEN secret that is no longer valid, so pushes to gh-pages failed with a git auth error and the site stopped updating. Switch to the built-in Pages pipeline (upload-pages-artifact + deploy-pages), which authenticates via the workflow's OIDC token and needs no PAT.
1 parent 3b5a45a commit 8d4a67e

1 file changed

Lines changed: 25 additions & 17 deletions

File tree

‎.github/workflows/sphinx.yml‎

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,18 @@ on:
77
- documentation-staging
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow one concurrent deployment, cancel in-progress runs for the same ref.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
1020
jobs:
11-
pages:
21+
build:
1222
runs-on: ubuntu-latest
1323
steps:
1424
- uses: actions/checkout@v4
@@ -24,20 +34,18 @@ jobs:
2434
- name: Build HTML
2535
run: python -m sphinx.cmd.build -M html docs/source docs/build
2636

27-
- name: Upload artifacts
28-
uses: actions/upload-artifact@v4
29-
with:
30-
name: html-docs
31-
path: docs/build/html/
32-
33-
# - name: Deploy
34-
# uses: sphinx-notes/pages@v3
35-
# with:
36-
# publish: true
37-
38-
- name: Deploy
39-
uses: peaceiris/actions-gh-pages@v3
37+
- name: Upload Pages artifact
38+
uses: actions/upload-pages-artifact@v3
4039
with:
41-
github_token: ${{ secrets.DOCSITE_TOKEN }}
42-
publish_branch: gh-pages
43-
publish_dir: docs/build/html
40+
path: docs/build/html
41+
42+
deploy:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)