diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e33cc6a..c4b9895 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: @@ -45,12 +49,14 @@ 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' # 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 }} 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