Skip to content
Latchkey

Build Docs (Conda) workflow (Unidata/siphon)

The Build Docs (Conda) workflow from Unidata/siphon, explained and optimized by Latchkey.

B

CI health: B - good

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: Unidata/siphon.github/workflows/docs-conda.ymlLicense BSD-3-ClauseView source

What it does

This is the Build Docs (Conda) workflow from the Unidata/siphon repository, a real project running GitHub Actions. It is shown here with attribution under its BSD-3-Clause license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Build Docs (Conda)

# We don't want pushes (or PRs) to gh-pages to kick anything off
on:
  pull_request:
    branches:
      - main
      - '[0-9]+.[0-9]+.x'

concurrency:
  group: ${{ github.workflow}}-${{ github.head_ref }}
  cancel-in-progress: true

jobs:
  Docs:
    name: ${{ matrix.os }} ${{ matrix.python-version }}
    runs-on: ${{ matrix.os }}-latest
    defaults:
      run:
        shell: bash -l {0}
    strategy:
      fail-fast: false
      matrix:
        include:
          - python-version: 3.11
            os: macOS
          - python-version: 3.12
            os: Windows
          - python-version: 3.13
            os: macOS
          - python-version: 3.14
            os: Windows

    steps:
    - name: Checkout source
      uses: actions/checkout@v7
      with:
        fetch-depth: 150
        fetch-tags: true

    - name: Install from Conda
      uses: Unidata/MetPy/.github/actions/install-conda@main
      with:
        type: 'doc'
        python-version: ${{ matrix.python-version }}
        need-cartopy: true

    - name: Build docs
      uses: Unidata/MetPy/.github/actions/build-docs@main
      with:
        key: ${{ matrix.os }}-${{ matrix.python-version }}
        make-targets: ''

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Build Docs (Conda)
 
# We don't want pushes (or PRs) to gh-pages to kick anything off
on:
  pull_request:
    branches:
      - main
      - '[0-9]+.[0-9]+.x'
 
concurrency:
  group: ${{ github.workflow}}-${{ github.head_ref }}
  cancel-in-progress: true
 
jobs:
  Docs:
    timeout-minutes: 30
    name: ${{ matrix.os }} ${{ matrix.python-version }}
    runs-on: ${{ matrix.os }}-latest
    defaults:
      run:
        shell: bash -l {0}
    strategy:
      fail-fast: false
      matrix:
        include:
          - python-version: 3.11
            os: macOS
          - python-version: 3.12
            os: Windows
          - python-version: 3.13
            os: macOS
          - python-version: 3.14
            os: Windows
 
    steps:
    - name: Checkout source
      uses: actions/checkout@v7
      with:
        fetch-depth: 150
        fetch-tags: true
 
    - name: Install from Conda
      uses: Unidata/MetPy/.github/actions/install-conda@main
      with:
        type: 'doc'
        python-version: ${{ matrix.python-version }}
        need-cartopy: true
 
    - name: Build docs
      uses: Unidata/MetPy/.github/actions/build-docs@main
      with:
        key: ${{ matrix.os }}-${{ matrix.python-version }}
        make-targets: ''
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow