name: Docs Build

permissions:
  contents: read

on: [push, pull_request]

jobs:
  docs-build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
        with:
          pixi-version: v0.42.1
          cache: true
          environments: docs
      - name: Build Docs
        run: pixi run -e docs docs
      - name: Upload Artifact
        uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
        with:
          name: docs-build
          path: docs/build/
