From 41bc69534d3badd60ddea31a5d0c2b942587c664 Mon Sep 17 00:00:00 2001 From: Keerthana Panyam Date: Fri, 27 Jun 2025 15:21:50 -0400 Subject: [PATCH 1/4] ci: fail Sphinx doc builds on warnings - Updated workflow to use `sphinx-build -W` to treat warnings as errors - Blocks PR merges if doc build fails due to warnings - On successful merge to `main`,rebuilds and deploys docs to GitHub Pages It's based on work by @jimmac --- .github/workflows/sphinx-deploy.yml | 46 ++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sphinx-deploy.yml b/.github/workflows/sphinx-deploy.yml index 42bb87f..44ce6cb 100644 --- a/.github/workflows/sphinx-deploy.yml +++ b/.github/workflows/sphinx-deploy.yml @@ -2,17 +2,49 @@ name: Deploy Sphinx documentation to Pages on: push: - branches: [main] # branch to trigger deployment + branches: [main] + pull_request: + branches: [main] jobs: - pages: + build: runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install dependencies + run: | + python -m pip install -U pip + pip install -r docs/requirements.txt + + - name: Build docs with Sphinx (fail on warnings) + run: | + sphinx-build -W -b html docs/ build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: build + + deploy: + needs: build + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' permissions: pages: write id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - - id: deployment - uses: sphinx-notes/pages@v3 + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file From 5389e76719815bd3599b7b1bce813b37d7a5234a Mon Sep 17 00:00:00 2001 From: Keerthana Panyam Date: Fri, 27 Jun 2025 15:57:54 -0400 Subject: [PATCH 2/4] fix: docs warning about a missing reference --- docs/best-practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/best-practices.md b/docs/best-practices.md index e0cfdf8..46d6a95 100644 --- a/docs/best-practices.md +++ b/docs/best-practices.md @@ -2,7 +2,7 @@ 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. -Before you read this guide, you should be familiar with the main Granite.Code features, which are described in the [getting started tutorial](FIXME). +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). ## Asking effective questions From 35397b1f0e61e2b584076e15cc31693f0a6ad003 Mon Sep 17 00:00:00 2001 From: Keerthana Panyam Date: Mon, 30 Jun 2025 10:56:43 -0400 Subject: [PATCH 3/4] changed workflow title --- .github/workflows/sphinx-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx-deploy.yml b/.github/workflows/sphinx-deploy.yml index 44ce6cb..fb04ac7 100644 --- a/.github/workflows/sphinx-deploy.yml +++ b/.github/workflows/sphinx-deploy.yml @@ -1,4 +1,4 @@ -name: Deploy Sphinx documentation to Pages +name: Build & Deploy Sphinx documentation to Pages on: push: From 07c36faa04cb5a3f910045f9ebbb74b53ec54a3c Mon Sep 17 00:00:00 2001 From: Keerthana Panyam Date: Mon, 30 Jun 2025 11:07:26 -0400 Subject: [PATCH 4/4] changes to workflow action names test2 --- .github/workflows/sphinx-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx-deploy.yml b/.github/workflows/sphinx-deploy.yml index fb04ac7..840ac24 100644 --- a/.github/workflows/sphinx-deploy.yml +++ b/.github/workflows/sphinx-deploy.yml @@ -20,7 +20,7 @@ jobs: with: python-version: 3.11 - - name: Install dependencies + - name: Install documentation dependencies run: | python -m pip install -U pip pip install -r docs/requirements.txt @@ -29,7 +29,7 @@ jobs: run: | sphinx-build -W -b html docs/ build - - name: Upload artifact + - name: Upload documentation artifact uses: actions/upload-pages-artifact@v3 with: path: build