Skip to content

Commit cf640a1

Browse files
author
yaroslav
committed
gh docs update
1 parent 656c954 commit cf640a1

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

.github/workflows/docs.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
9+
contents: write
1210

1311
jobs:
14-
build:
12+
build-and-deploy:
1513
runs-on: ubuntu-latest
1614
steps:
1715
- name: Checkout
@@ -30,21 +28,12 @@ jobs:
3028
- name: Build HTML
3129
run: sphinx-build -b html docs/source docs/_build/html
3230

33-
- name: Upload artifact
34-
uses: actions/upload-pages-artifact@v3
35-
with:
36-
path: docs/_build/html
31+
- name: Disable Jekyll
32+
run: touch docs/_build/html/.nojekyll
3733

38-
deploy:
39-
needs: build
40-
runs-on: ubuntu-latest
41-
environment:
42-
name: github-pages
43-
url: ${{ steps.deployment.outputs.page_url }}
44-
permissions:
45-
pages: write
46-
id-token: write
47-
steps:
4834
- name: Deploy to GitHub Pages
49-
id: deployment
50-
uses: actions/deploy-pages@v4
35+
uses: peaceiris/actions-gh-pages@v4
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: docs/_build/html
39+
publish_branch: gh-pages

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ Output appears in `docs/_build/html`. Open `index.html` in a browser to view.
2424
GitHub Pages can publish the docs via GitHub Actions (Source: GitHub Actions). After pushing to `main`, enable Pages in Repository Settings → Pages with Source set to GitHub Actions.
2525

2626
The site uses the PyData Sphinx Theme (pulled in via `docs/requirements.txt`).
27+
28+
To serve from the `gh-pages` branch (recommended for this workflow):
29+
Settings → Pages → Build and deployment → Source: Deploy from a branch → Branch: `gh-pages` / folder: `/ (root)`.

0 commit comments

Comments
 (0)