# Check color contrast on every pull request.
# From https://auricartisan.com/integrations/contrast-ci/ - CC0 1.0.
# Put this file in .github/workflows/, check-contrast.mjs and contrast-pairs.json
# at the root of the repository, and an API key in the repository secret AURIC_API_KEY.
name: Contrast

on:
  pull_request:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  contrast:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version: 24
      - name: Check color contrast
        run: node check-contrast.mjs contrast-pairs.json
        env:
          AURIC_API_KEY: ${{ secrets.AURIC_API_KEY }}
