Skip to content
Latchkey

Docs CI workflow (redis/redis-py)

The Docs CI workflow from redis/redis-py, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: redis/redis-py.github/workflows/docs.yamlLicense MITView source

What it does

This is the Docs CI workflow from the redis/redis-py repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

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

The workflow

workflow (.yml)
name: Docs CI

on:
  push:
    branches:
      - master
      - '[0-9].[0-9]'
  pull_request:
    branches:
      - master
      - '[0-9].[0-9]'
  schedule:
    - cron: '0 1 * * *' # nightly build

concurrency:
  group: ${{ github.event.pull_request.number || github.ref }}-docs
  cancel-in-progress: true

permissions:
  contents: read  #  to fetch code (actions/checkout)

jobs:

   build-docs:
     name: Build docs
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v7
       - uses: actions/setup-python@v6
         with:
           python-version: "3.10"
           cache: 'pip'
       - name: install deps
         run: |
           sudo apt-get update -yqq
           sudo apt-get install -yqq pandoc make
       - name: run code linters
         run: |
           pip install -r dev_requirements.txt -r docs/requirements.txt
           invoke build-docs

       - name: upload docs
         uses: actions/upload-artifact@v7
         with:
           name: redis-py-docs
           path: |
             docs/_build/html

The same workflow, on Latchkey

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

name: Docs CI
 
on:
  push:
    branches:
      - master
      - '[0-9].[0-9]'
  pull_request:
    branches:
      - master
      - '[0-9].[0-9]'
  schedule:
    - cron: '0 1 * * *' # nightly build
 
concurrency:
  group: ${{ github.event.pull_request.number || github.ref }}-docs
  cancel-in-progress: true
 
permissions:
  contents: read  #  to fetch code (actions/checkout)
 
jobs:
 
   build-docs:
     timeout-minutes: 30
     name: Build docs
     runs-on: latchkey-small
     steps:
       - uses: actions/checkout@v7
       - uses: actions/setup-python@v6
         with:
           python-version: "3.10"
           cache: 'pip'
       - name: install deps
         run: |
           sudo apt-get update -yqq
           sudo apt-get install -yqq pandoc make
       - name: run code linters
         run: |
           pip install -r dev_requirements.txt -r docs/requirements.txt
           invoke build-docs
 
       - name: upload docs
         uses: actions/upload-artifact@v7
         with:
           name: redis-py-docs
           path: |
             docs/_build/html
 

What changed

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

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