Skip to content

Commit

Permalink
try doc version
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Oct 26, 2023
1 parent b600454 commit 90563e1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/deploy_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 'CONTRIBUTING.md'
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflows/deploy_mkdocs.yml'

jobs:
build:
Expand All @@ -29,7 +30,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[psycopg-binary]"
python -m pip install nbconvert==6.5.3 mkdocs mkdocs-material mkdocs-jupyter pygments pdocs
python -m pip install nbconvert==6.5.3 mkdocs mkdocs-material mkdocs-jupyter pygments pdocs mike
- name: update API docs
run: |
Expand All @@ -47,5 +48,24 @@ jobs:
titiler.pgstac.settings \
titiler.pgstac.utils
- name: Deploy docs
run: mkdocs gh-deploy -f docs/mkdocs.yml --force
- name: Set module version
id: module
run: |
echo version=$(python -c'import titiler.pgstac; print(titiler.pgstac.__version__)') >> $GITHUB_OUTPUT
- name: Configure Git user
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Deploy documentation
if: ${{ github.ref_type == 'branch' }}
run: |
mike deploy --push --update-aliases latest --config-file docs/mkdocs.yml
mike set-default --push latest --config-file docs/mkdocs.yml
- name: Deploy documentation and update alias for latest
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
run: |
mike deploy --push --update-aliases ${{ steps.module.outputs.version}} latest --config-file docs/mkdocs.yml
mike set-default --push latest --config-file docs/mkdocs.yml
17 changes: 10 additions & 7 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ site_description: Dynamic Mosaics From PgSTAC database.
docs_dir: 'src'
site_dir: 'build'

repo_name: "stac-utils/titiler-pgstac"
repo_url: "https://github.com/stac-utils/titiler-pgstac"
edit_uri: "blob/main/docs/"
site_url: "https://stac-utils.github.io/titiler-pgstac/"
repo_name: stac-utils/titiler-pgstac
repo_url: https://github.com/stac-utils/titiler-pgstac
edit_uri: blob/main/docs/
site_url: https://stac-utils.github.io/titiler-pgstac/

extra:
social:
- icon: "fontawesome/brands/github"
link: "https://github.com/stac-utils"
version:
provider: mike
default: latest

nav:
- Home: "index.md"
Expand Down Expand Up @@ -53,13 +56,13 @@ plugins:
include_source: True

theme:
palette:
primary: teal
scheme: default
name: material
favicon: img/favicon.ico
logo: img/logo.png

extra_css:
- overrides/stylesheets/extra.css

# https://github.com/kylebarron/cogeo-mosaic/blob/mkdocs/mkdocs.yml#L50-L75
markdown_extensions:
- admonition
Expand Down
Binary file modified docs/src/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/src/overrides/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:root {
--md-primary-fg-color: rgb(61, 121, 153);
--md-primary-fg-color--light: rgb(61, 121, 153);
--md-primary-fg-color--dark: rgb(61, 121, 153);
}

0 comments on commit 90563e1

Please sign in to comment.