diff --git a/.github/workflows/deploy_mkdocs.yml b/.github/workflows/deploy_mkdocs.yml index 0e872b70d..87e7e57d0 100644 --- a/.github/workflows/deploy_mkdocs.yml +++ b/.github/workflows/deploy_mkdocs.yml @@ -30,6 +30,19 @@ jobs: python -m pip install --upgrade pip python -m pip install numpy python -m pip install -e .["docs"] + python -m pip install git+https://github.com/timothycrosley/pdocs + + - name: update API docs + run: | + pdocs as_markdown \ + --output_dir docs/api/ \ + --exclude_source \ + --overwrite \ + titiler.dependencies \ + titiler.endpoints.factory \ + titiler.middleware \ + titiler.utils \ + titiler.resources.enums - name: Deploy docs run: mkdocs gh-deploy --force diff --git a/.gitignore b/.gitignore index 905040082..210d99b56 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,4 @@ ENV/ cdk.out/ deployment/k8s/titiler/values-test.yaml +docs/api diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54afdc065..e9cae284e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,3 +38,15 @@ Actions deploys automatically for new commits.): ```bash $ mkdocs gh-deploy ``` + +```bash +pdocs as_markdown \ + --output_dir docs/api/ \ + --exclude_source \ + --overwrite \ + titiler.dependencies \ + titiler.endpoints.factory \ + titiler.middleware \ + titiler.utils \ + titiler.resources.enums +``` diff --git a/mkdocs.yml b/mkdocs.yml index e8f9d1c02..4aa12bfcd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -46,6 +46,13 @@ nav: - Custom Sentinel 2 Tiler: "examples/Create_CustomSentinel2Tiler.ipynb" - NumpyTile: "examples/Working_with_NumpyTile.ipynb" + - API: + - dependencies: api/titiler/dependencies.md + - factory: api/titiler/endpoints/factory.md + - middleware: api/titiler/middleware.md + - utils: api/titiler/utils.md + - enums: api/titiler/resources/enums.md + - Deployment: - Amazon Web Services: - Intro: "deployment/aws/intro.md"