From 52e5598bcb842e3cd720a4e4ce03c331616da7e8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 3 Nov 2025 18:27:28 +0000 Subject: [PATCH 1/3] Fix GHA error: Exclude .venv from Sphinx build Sphinx was attempting to read files from the .venv virtual environment directory, causing the build to fail or include unwanted files. Changes: - Add .venv, venv, and env to exclude_patterns in conf.py - Add .venv/ to .gitignore to prevent committing virtual environment --- .gitignore | 1 + conf.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8e34876..5383ddb 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ __pycache__/ .Python env/ venv/ +.venv/ diff --git a/conf.py b/conf.py index 0e9ef41..5b92412 100644 --- a/conf.py +++ b/conf.py @@ -22,7 +22,7 @@ ] templates_path = ['_templates'] -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'README.md', 'CHANGELOG.md', 'CONTRIBUTING.md', '.github'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'README.md', 'CHANGELOG.md', 'CONTRIBUTING.md', '.github', '.venv', 'venv', 'env'] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output From 28e65ef468eaeeade7272c54f77aa22011a22e3e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 3 Nov 2025 18:31:10 +0000 Subject: [PATCH 2/3] Run GHA build on pull requests without deploying This allows testing the build in GitHub Actions before merging: - Build job runs on both PRs and pushes to main/master - Deploy job only runs on pushes to main/master (not on PRs) This way you can verify the build passes in PR checks without actually deploying to GitHub Pages. --- .github/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e33cc6a..6e25d2f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,10 @@ on: push: branches: ["master", "main"] + # Runs on pull requests to test the build + pull_request: + branches: ["master", "main"] + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -51,6 +55,8 @@ jobs: # Deployment job deploy: + # Only deploy on pushes to main/master, not on pull requests + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} From 76efdf59a916f97ed0cadf9123feef850e43ca3c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 3 Nov 2025 18:33:32 +0000 Subject: [PATCH 3/3] Update upload-pages-artifact to v3 Fix GHA error: actions/upload-pages-artifact@v2 is deprecated because it uses the deprecated v3 of upload-artifact internally. Updated to v3 which uses the current artifact actions. --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6e25d2f..c4b9895 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -49,7 +49,7 @@ jobs: uv run sphinx-build -b html . _build/html - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: '_build/html'