Add comprehensive testing documentation for shell scripts and Python agent #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Documentation | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'docs/**' | |
- 'mkdocs.yml' | |
- 'README.md' | |
- '.github/workflows/docs.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'docs/**' | |
- 'mkdocs.yml' | |
- 'README.md' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for git plugins | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/uv | |
key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} | |
restore-keys: | | |
${{ runner.os }}-uv- | |
- name: Install dependencies | |
run: | | |
uv pip install --system -e ".[docs]" | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
- name: Build documentation | |
run: | | |
mkdocs build --clean | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./site | |
# Deployment job | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |