Deploy Documentation workflow (aws/bedrock-agentcore-starter-toolkit)
The Deploy Documentation workflow from aws/bedrock-agentcore-starter-toolkit, explained and optimized by Latchkey.
CI health: F - at risk
Point runs-on at Latchkey and get caching, run de-duplication, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Deploy Documentation workflow from the aws/bedrock-agentcore-starter-toolkit 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
name: Deploy Documentation
on:
push:
branches:
- main
paths:
- 'documentation/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch: # Allows manual triggering
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for proper versioning
- name: Checkout SDK repository
uses: actions/checkout@v5
with:
repository: aws/bedrock-agentcore-sdk-python
path: bedrock-agentcore-sdk-python
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Create virtual environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install mkdocs-material mkdocstrings-python pymdown-extensions
uv pip install mike mkdocs-macros-plugin mkdocs-llmstxt mkdocs-include-markdown-plugin
# Install the SDK package from PyPI
uv pip install bedrock-agentcore
# Install the toolkit package in development mode
uv pip install -e .
- name: Setup Git for mike versioning
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
- name: Deploy documentation
working-directory: ./documentation
run: |
source ../.venv/bin/activate
mkdocs gh-deploy --force
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 Documentation on: push: branches: - main paths: - 'documentation/**' - '.github/workflows/deploy-docs.yml' workflow_dispatch: # Allows manual triggering permissions: contents: write pages: write id-token: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: deploy: timeout-minutes: 30 runs-on: latchkey-small steps: - uses: actions/checkout@v5 with: fetch-depth: 0 # Fetch all history for proper versioning - name: Checkout SDK repository uses: actions/checkout@v5 with: repository: aws/bedrock-agentcore-sdk-python path: bedrock-agentcore-sdk-python fetch-depth: 1 - name: Set up Python uses: actions/setup-python@v5 with: cache: 'pip' python-version: '3.10' - name: Install uv uses: astral-sh/setup-uv@v6 - name: Create virtual environment and install dependencies run: | uv venv source .venv/bin/activate uv pip install mkdocs-material mkdocstrings-python pymdown-extensions uv pip install mike mkdocs-macros-plugin mkdocs-llmstxt mkdocs-include-markdown-plugin # Install the SDK package from PyPI uv pip install bedrock-agentcore # Install the toolkit package in development mode uv pip install -e . - name: Setup Git for mike versioning run: | git config --global user.name "github-actions" git config --global user.email "github-actions@github.com" - name: Deploy documentation working-directory: ./documentation run: | source ../.venv/bin/activate 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.
- Cache dependency installs on the setup step so they are served from cache.
- Add a job timeout so a hung step cannot burn hours of runner time.
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.
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:
- Dependency installs
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.