Skip to content

Commit

Permalink
Build docs against the latest jupyterlite-xeus-python (jupyter-widget…
Browse files Browse the repository at this point in the history
…s-contrib#338)

* Build docs against the latest jupyterlite-xeus-python

* Missing comma

* Missing build dependencies

* Add workflow for rtd preview in PRs
  • Loading branch information
martinRenou authored Jul 25, 2023
1 parent fe685a8 commit b5cf121
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 20 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/rtd_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: RTD Preview
on:
pull_request_target:
types: [opened]

permissions:
pull-requests: write

jobs:
binder:
runs-on: ubuntu-latest
steps:
- name: Comment on the PR with the RTD preview
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_NUMBER = context.issue.number
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://ipycanvas--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}/lite/lab/index.html) :point_left: Try it on ReadTheDocs with JupyterLite!`
})
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ build:
python: "mambaforge-4.10"

conda:
environment: docs/environment.yml
environment: docs/build-environment.yml
15 changes: 15 additions & 0 deletions docs/build-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: ipycanvas-docs

channels:
- conda-forge

dependencies:
- ipycanvas
- mamba
# This is needed for building ipycanvas from source for the emscripten env
- yarn
# Docs requirements
- pydata-sphinx-theme
- jupyterlite-sphinx
- jupyterlite-xeus-python >=0.9.2,<0.10
- jupyterlab-night
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "jupyterlite_sphinx"]

jupyterlite_config = "jupyterlite_config.json"
jupyterlite_dir = "."

master_doc = "index"
Expand Down
20 changes: 7 additions & 13 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: xeus-python-kernel-docs

name: ipycanvas
channels:
- conda-forge

- https://repo.mamba.pm/emscripten-forge
- https://repo.mamba.pm/conda-forge
dependencies:
- ipycanvas
- mamba
- pydata-sphinx-theme
- empack

- pillow
- numpy
- ipywidgets
- pip:
- jupyterlite
- jupyterlite-sphinx
- jupyterlite-xeus-python
- jupyterlab-night
- ..
5 changes: 0 additions & 5 deletions docs/jupyterlite_config.json

This file was deleted.

0 comments on commit b5cf121

Please sign in to comment.