name: Docs Build

permissions:
  contents: read

on: [push, pull_request]

jobs:
  docs-build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

      - uses: prefix-dev/setup-pixi@28eb668aafebd9dede9d97c4ba1cd9989a4d0004 # v0.9.2
        with:
          pixi-version: v0.58.0
          cache: true
          environments: docs

      - name: Build Docs
        run: pixi run -e docs docs

      - name: Upload Artifact
        uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
        with:
          name: docs-build
          path: docs/build/
