Skip to content

Commit f1b77b9

Browse files
fingers crossed
1 parent 8971d93 commit f1b77b9

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

.github/workflows/sphinx.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
name: Sphinx build
22

3-
on: push
3+
on:
4+
push:
5+
branches: [main]
46

57
jobs:
68
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/configure-pages@v5
13+
- name: Build HTML
14+
run: |
15+
pip install -r docs/requirements.txt
16+
sphinx-build docs/source docs/build/html
17+
- uses: actions/upload-pages-artifact@v3
18+
with:
19+
path: docs/build/html
20+
21+
deploy:
22+
needs: build
723
runs-on: ubuntu-latest
824
permissions:
9-
contents: write
25+
pages: write
26+
id-token: write
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
1030
steps:
11-
- uses: actions/checkout@v4
12-
with:
13-
persist-credentials: false
14-
- name: Build HTML
15-
uses: ammaraskar/sphinx-action@master
16-
- name: Upload artifacts
17-
uses: actions/upload-artifact@v4
18-
with:
19-
name: html-docs
20-
path: docs/build/html/
21-
- name: Deploy
22-
uses: peaceiris/actions-gh-pages@v3
23-
if: github.ref == 'refs/heads/main'
24-
with:
25-
github_token: ${{ secrets.GITHUB_TOKEN }}
26-
publish_dir: docs/build/html
31+
- uses: actions/deploy-pages@v4
32+
id: deployment

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Sphinx==8.2.3
2+
alabaster==1.0.0

docs/source/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1616

17-
extensions = ['sphinx.ext.githubpages']
18-
17+
extensions = []
1918
templates_path = ['_templates']
2019
exclude_patterns = []
2120

@@ -27,7 +26,7 @@
2726
html_css_files = ['custom.css']
2827
html_theme_options = {
2928
'font_family': 'Arial, sans-serif',
30-
# 'github_banner': True,
29+
'github_banner': True,
3130
'github_user': 'picocomputer',
3231
'github_repo': '',
3332
'fixed_sidebar': False,

0 commit comments

Comments
 (0)