Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
81 changes: 81 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Deploy site

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
# The reference pages describe behaviour that lives in the commit-check
# repository, so they can drift without anything here changing. This job
# reads both and fails when they disagree.
docs-sync:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false

- uses: actions/setup-python@v7
with:
python-version: '3.x'

# Installed from main rather than PyPI: the site documents rule IDs that
# are merged but not yet released, so the published package would report
# a spurious mismatch. Switch this to the released package once a version
# carrying them is on PyPI.
- name: Install commit-check from main
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install "commit-check @ git+https://github.com/commit-check/commit-check@main"

- name: Check the docs against the package
run: pytest tests/ -q

build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false

- uses: actions/setup-python@v7
with:
python-version: '3.x'

# The social plugin renders the share cards through cairo, which cairosvg
# loads at runtime rather than bundling.
- name: Install cairo
run: sudo apt-get install -y --no-install-recommends libcairo2

- name: Build site
run: pipx run nox -s docs

- name: Upload site as pages artifact
uses: actions/upload-pages-artifact@v5
with:
name: ${{ github.event.repository.name }}_site
path: ${{ github.workspace }}/site

deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
needs: [build]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Make documentation validation a deployment dependency.

deploy only needs build. If docs-sync fails and build succeeds, this workflow still deploys the site from main.

Add docs-sync to needs.

Proposed fix
-    needs: [build]
+    needs: [docs-sync, build]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
needs: [build]
needs: [docs-sync, build]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy.yml at line 69, Update the deploy job’s needs
declaration to include docs-sync alongside build, ensuring deployment waits for
and is blocked by documentation validation failures.

permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
with:
artifact_name: ${{ github.event.repository.name }}_site
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Build output
site/

# Social card cache
.cache/

# Python
__pycache__/
*.py[cod]
.nox/
.venv/

# OS
.DS_Store
Thumbs.db
Binary file removed scripts/__pycache__/mkdocs_hooks.cpython-311.pyc
Binary file not shown.
Binary file not shown.