Skip to content

switch to httpx, clean dependencies #69

switch to httpx, clean dependencies

switch to httpx, clean dependencies #69

Workflow file for this run

name: docs
on:
push:
branches:
- master
workflow_dispatch:
env:
POETRY_VERSION: "1.8.2"
PYTHON_VERSION: "3.10"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Poetry Packages
uses: actions/cache@v4
with:
path: |
~/.local
.venv
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Install and configure Poetry
uses: snok/[email protected]
with:
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
- name: Ubuntu system dependencies
run: |
sudo apt update
sudo apt install -y libgdal-dev libgeos-dev libproj-dev proj-bin proj-data
- name: Install dependencies
run: |
poetry install
- name: Populate cache if need be
if: steps.cache-folder.outputs.cache-hit != 'true'
env:
LD_LIBRARY_PATH: /usr/local/lib
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run python -c "from cartes.atlas import default, world_atlas"
- name: Build pages
env:
LD_LIBRARY_PATH: /usr/local/lib
run: |
# reuse the same cache folder as tests
cd docs && CARTES_CACHE=../tests/cache poetry run make html
- name: Deploy pages
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: cartes-viz/cartes-viz.github.io
publish_branch: master
publish_dir: docs/build/html