Skip to content

Commit b367e9d

Browse files
committed
fix(ci): switch docs publish to gh-pages branch deploy
1 parent bdb8b90 commit b367e9d

1 file changed

Lines changed: 8 additions & 24 deletions

File tree

.github/workflows/docs-github-pages-publish.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ on:
3232
type: string
3333

3434
permissions:
35-
contents: read
36-
pages: write
37-
id-token: write
35+
contents: write
3836

3937
concurrency:
4038
group: docs-github-pages
@@ -109,25 +107,11 @@ jobs:
109107
- name: Build docs site
110108
run: mkdocs build --config-file mkdocs.yml
111109

112-
- name: Setup GitHub Pages
113-
uses: actions/configure-pages@v5
110+
- name: Deploy docs to gh-pages branch
111+
uses: peaceiris/actions-gh-pages@v4
114112
with:
115-
enablement: true
116-
117-
- name: Upload Pages artifact
118-
uses: actions/upload-pages-artifact@v4
119-
with:
120-
path: build/mkdocs-site
121-
122-
deploy-site:
123-
name: deploy-site
124-
runs-on: ubuntu-latest
125-
needs: build-site
126-
environment:
127-
name: github-pages
128-
url: ${{ steps.deployment.outputs.page_url }}
129-
130-
steps:
131-
- name: Deploy to GitHub Pages
132-
id: deployment
133-
uses: actions/deploy-pages@v4
113+
github_token: ${{ secrets.GITHUB_TOKEN }}
114+
publish_dir: build/mkdocs-site
115+
publish_branch: gh-pages
116+
force_orphan: true
117+
commit_message: "docs: publish site from ${{ github.sha }}"

0 commit comments

Comments
 (0)