Upload PR Documentation workflow (huggingface/lighteval)
The Upload PR Documentation workflow from huggingface/lighteval, explained and optimized by Latchkey.
A
CI health: A - excellent
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the Upload PR Documentation workflow from the huggingface/lighteval 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: Upload PR Documentation
on:
workflow_run:
workflows: ["Build PR Documentation"]
types:
- completed
jobs:
build:
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@9ad2de8582b56c017cb530c1165116d40433f1c6 # main
with:
package_name: lighteval
secrets:
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
comment_bot_app_id: ${{ secrets.COMMENT_BOT_APP_ID }}
comment_bot_secret_pem: ${{ secrets.COMMENT_BOT_SECRET_PEM }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Upload PR Documentation on: workflow_run: workflows: ["Build PR Documentation"] types: - completed jobs: build: timeout-minutes: 30 uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@9ad2de8582b56c017cb530c1165116d40433f1c6 # main with: package_name: lighteval secrets: hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} comment_bot_app_id: ${{ secrets.COMMENT_BOT_APP_ID }} comment_bot_secret_pem: ${{ secrets.COMMENT_BOT_SECRET_PEM }}
What changed
- 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.