Skip to content

Commit

Permalink
update poetry install in docs ci
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltopo committed Oct 14, 2024
1 parent d5c8f99 commit b0a309d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,50 @@ jobs:
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: "poetry"

- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local # the path depends on the OS
key: poetry-0 # increment to reset cache

- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies (with cache)
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Install project
run: poetry install --no-interaction

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV

- name: Setup Cache for MkDocs
uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install Dependencies
run: python -m poetry install
- name: Deploy to gh-pages
run: python -m ​poetry run mkdocs gh-deploy --force
run: poetry run mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ plugins:
default_handler: python
handlers:
python:
paths: [../icechunk-python/python/icechunk]
paths: [../icechunk-python/python]

- mkdocs-jupyter:
include_source: True
Expand Down
2 changes: 1 addition & 1 deletion docs/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package-mode = false
python = "^3.10"
mkdocs = "^1.6.1"
mkdocs-material = {extras = ["imaging"], version = "^9.5.39"}
mkdocstrings = {extras = ["python"], version = "^0.26.1"}
mkdocstrings = {extras = ["python"], version = "^0.26.2"}
mkdocs-jupyter = "^0.25.0"
mkdocs-awesome-pages-plugin = "^2.9.3"
mkdocs-git-revision-date-localized-plugin = "^1.2.9"
Expand Down

0 comments on commit b0a309d

Please sign in to comment.