Skip to content
Latchkey

Deploy docs to GitHub Pages workflow (fal-ai/fal)

The Deploy docs to GitHub Pages workflow from fal-ai/fal, explained and optimized by Latchkey.

D

CI health: D - needs work

Point runs-on at Latchkey and get caching, run de-duplication, 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: fal-ai/fal.github/workflows/docs.yamlLicense Apache-2.0View source

What it does

This is the Deploy docs to GitHub Pages workflow from the fal-ai/fal repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

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

The workflow

workflow (.yml)
name: Deploy docs to GitHub Pages

on:
  pull_request:
  push:
    branches: [main]

jobs:
  pages:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0

    - name: Set up Python
      uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
      with:
        python-version: '3.11'

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -e 'projects/fal[docs]'
        pip install -e 'projects/fal_client[docs]'

    - name: Build documentation
      run: make docs

    - name: Deploy to GitHub Pages
      if: github.event_name == 'push' && github.ref == 'refs/heads/main'
      uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: docs/_build/html

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: Deploy docs to GitHub Pages
 
on:
  pull_request:
  push:
    branches: [main]
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  pages:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
    - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
 
    - name: Set up Python
      uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
      with:
        cache: 'pip'
        python-version: '3.11'
 
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -e 'projects/fal[docs]'
        pip install -e 'projects/fal_client[docs]'
 
    - name: Build documentation
      run: make docs
 
    - name: Deploy to GitHub Pages
      if: github.event_name == 'push' && github.ref == 'refs/heads/main'
      uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: 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