Skip to content

Commit

Permalink
Build and publish docs to github pages
Browse files Browse the repository at this point in the history
This also makes use of jupyterlite-sphinx to automatically embed the
lite deployment into the docs
  • Loading branch information
martinRenou committed Nov 19, 2024
1 parent 456b948 commit bd1c29c
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 480 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

build-lite:
name: Build JupyterLite
build-docs-and-lite:
name: Build docs with JupyterLite deployment
needs: build
runs-on: ubuntu-latest

Expand All @@ -262,6 +262,10 @@ jobs:
pip
jupyterlite-core>=0.2.0,<0.3.0
jupyterlite-xeus>=0.1.2,<0.2
jupyterlite-sphinx
sphinx
sphinxpydata-sphinx-theme
sphinx-autodoc-typehints
- name: Download extension package
uses: actions/download-artifact@v3
Expand All @@ -275,12 +279,11 @@ jobs:
cp ./jupytergis_core/dist/jupytergis*.whl ./jupytergis_lab/dist/jupytergis*.whl ./jupytergis_qgis/dist/jupytergis*.whl .
python -m pip install jupytergis*.whl
- name: Build the lite site
- name: Build the docs site
shell: bash -l {0}
working-directory: lite
working-directory: docs
run: |
set -eux
mkdir -p content && cp ../examples/*.jGIS ../examples/*.json ./content
jupyter lite build --contents content --output-dir dist
- name: Upload artifact
Expand All @@ -296,7 +299,7 @@ jobs:
artifact_link: 'https://github.com/${{ github.repository }}/actions/runs/${{github.run_id}}/artifacts/${{ steps.upload-jupyterlite-artifact.outputs.artifact_id }}'

deploy:
needs: build-lite
needs: build-docs-and-lite
if: github.ref == 'refs/heads/main'
permissions:
pages: write
Expand Down
194 changes: 0 additions & 194 deletions docs/Makefile

This file was deleted.

File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/source/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
author = "The JupyterGIS Development Team"
language = "en"

jupyterlite_contents = ["../examples/*.jGIS", "../examples/*.json"]
jupyterlite_dir = "."

exclude_patterns = []
highlight_language = "python"
pygments_style = "sphinx"
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions docs/doc-requirements.txt

This file was deleted.

11 changes: 3 additions & 8 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: jupytergis
name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- python=3.12
- pip
- sphinx
- pydata-sphinx-theme
- sphinx-autodoc-typehints
- pip:
- jupytergis
- xeus-python
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bd1c29c

Please sign in to comment.