move Docker docs to doc site #22
This file contains 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 Publish Docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
- 'README.md' | |
- 'mkdocs.yml' | |
- '.github/workflows/build-docs.yml' | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Bump Version, Build and Publish Python"] | |
types: | |
- completed | |
jobs: | |
generate_and_publish_docs: | |
if: | | |
${{ | |
github.event_name != 'push' || | |
!contains(join(github.event.head_commit.modified, ','), 'fastapi_agents') && | |
!contains(join(github.event.head_commit.modified, ','), 'pyproject.toml') && | |
!contains(join(github.event.head_commit.modified, ','), 'uv.lock') && | |
!contains(join(github.event.head_commit.modified, ','), '.github/workflows/build-python.yml') | |
}} | |
&& ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python version from file | |
uses: actions/setup-python@v4 | |
with: | |
python-version-file: .python-version | |
- name: Install uv | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install uv | |
- name: Install dev dependencies | |
run: | | |
uv sync --dev | |
- name: Build docs | |
run: | | |
uv run mkdocs build | |
- name: Deploy to GitHub Pages | |
run: | | |
uv run mkdocs gh-deploy --force |