diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml index 9f65b581..8e362383 100644 --- a/.github/workflows/deploy-docs.yaml +++ b/.github/workflows/deploy-docs.yaml @@ -18,13 +18,43 @@ 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: @@ -32,7 +62,6 @@ jobs: 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 \ No newline at end of file + run: poetry run mkdocs gh-deploy --force \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 8f7a72ef..06e3237b 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -125,7 +125,7 @@ plugins: default_handler: python handlers: python: - paths: [../icechunk-python/python/icechunk] + paths: [../icechunk-python/python] - mkdocs-jupyter: include_source: True diff --git a/docs/poetry.lock b/docs/poetry.lock index 2ec69ac4..c7ad79b4 100644 --- a/docs/poetry.lock +++ b/docs/poetry.lock @@ -2722,4 +2722,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "cccdba240a9c138333a0e8c0eb70c98ab7ab18566be0364bdacda7caa952cf63" +content-hash = "3e27635ba9fec8528f1bd7aea243882f66e58198c2bee4df29f6a7552c84b933" diff --git a/docs/pyproject.toml b/docs/pyproject.toml index ebc42a58..ff6a82d1 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -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"