Documentation workflow (onekey-sec/unblob)
The Documentation workflow from onekey-sec/unblob, explained and optimized by Latchkey.
C
CI health: C - fair
Point runs-on at Latchkey and get run de-duplication, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Documentation workflow from the onekey-sec/unblob 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: Documentation
on:
push:
branches:
- main
- docs
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: true # required to call gh-deploy
- name: Install uv & Python
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: "3.10"
- name: Install the project
run: uv sync --only-group docs
- name: Generate documentation
run: uv run mkdocs gh-deploy --force
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Documentation on: push: branches: - main - docs permissions: contents: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: deploy: timeout-minutes: 30 runs-on: latchkey-small steps: - name: Checkout source code uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: true # required to call gh-deploy - name: Install uv & Python uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 with: enable-cache: true cache-dependency-glob: "uv.lock" python-version: "3.10" - name: Install the project run: uv sync --only-group docs - name: Generate documentation run: uv run mkdocs gh-deploy --force
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Cancel superseded runs when a branch or PR gets a newer push.
- Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.