Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit f13124c

Browse files
fix: enforces Sphinx build warnings and controlled deployment
Configures the docs CI workflow to: - Make Sphinx builds fail on warnings (`-W`). - Block Pull Request merges if docs build fails. - Deploy docs to GitHub Pages only from the `main` branch.
2 parents e4de151 + 5df4e1d commit f13124c

File tree

2 files changed

+41
-9
lines changed

2 files changed

+41
-9
lines changed
Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,50 @@
1-
name: Deploy Sphinx documentation to Pages
1+
name: Build & Deploy Sphinx documentation to Pages
22

33
on:
44
push:
5-
branches: [main] # branch to trigger deployment
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
68

79
jobs:
8-
pages:
10+
build:
911
runs-on: ubuntu-latest
10-
environment:
11-
name: github-pages
12-
url: ${{ steps.deployment.outputs.page_url }}
12+
permissions:
13+
contents: read
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.11
22+
23+
- name: Install documentation dependencies
24+
run: |
25+
python -m pip install -U pip
26+
pip install -r docs/requirements.txt
27+
28+
- name: Build docs with Sphinx (fail on warnings)
29+
run: |
30+
sphinx-build -W -b html docs/ build
31+
32+
- name: Upload documentation artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: build
36+
37+
deploy:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
if: github.ref == 'refs/heads/main'
1341
permissions:
1442
pages: write
1543
id-token: write
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
1647
steps:
17-
- id: deployment
18-
uses: sphinx-notes/pages@v3
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

docs/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This page provides information on how to get the most out of Granite.Code. It covers best practices for getting accurate and helpful chat responses, as well as supplementary options which make Granite.Code's features even more powerful.
44

5-
Before you read this guide, you should be familiar with the main Granite.Code features, which are described in the [getting started tutorial](FIXME).
5+
Before you read this guide, you should be familiar with the main Granite.Code features, which are described in the [getting started tutorial](https://docs.granitecode.github.io/getting-started).
66

77
## Asking effective questions
88

0 commit comments

Comments
 (0)