Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's instrument the site (if possible) to show a built preview of all PRs. #3

Open
fperez opened this issue Feb 2, 2023 · 3 comments
Assignees

Comments

@fperez
Copy link
Contributor

fperez commented Feb 2, 2023

It would be great to add an action that does a full build of the site for any PRs. This way, one could more easily see the result of the changes in a real site rather than imagining what they look like from the sources, or having to do a local build.

This would be similar to what we do in many Jupyter projects (see an example here in JupyterLab) where we automatically build a Binder link for anyone to be able to view the PR's effect without having to do a build.

I haven't looked into how to do it, but I'm sure it's possible...

@facusapienza21
Copy link
Member

That will be great! I was doing the build of the JupyterBook in local, but it's very inconvenient at the moment of checking how the new website looks like. I will explore this.

@facusapienza21
Copy link
Member

Thank you @yuvipanda for his feedback on this. What we need is Read the Docs for JupyteBook, which should create a different link where you can see the changes in the PR. I will add this to the repository to see if it works!

@facusapienza21
Copy link
Member

I was exploring this but still wasn't able to make it work.

I was able to set up the readtodocs page following the tutorial. However, in order to readthedocs to work with a JupyterBook, an extra configuration step needs to be made, as it is explained in the JupyterBook documentation. This requieres the configuration of sphinx to work, which can be done with the creation of the conf.py file:

version: 2

build:
  os: ubuntu-22.04
  tools:
    python: "3.8"
  jobs:
    pre_build:
      # Generate the Sphinx configuration for this Jupyter Book so it builds.
      - "jupyter-book config sphinx ."

# Build documentation in the docs/ directory with Sphinx
sphinx:
   configuration: docs/conf.py
   
   # Optionally declare the Python requirements required to build your docs
python:
   install:
   - requirements: book-requirements.txt

However, this doesn't work when building the readthedocs

Screen Shot 2023-02-02 at 7 56 23 PM

I need to explore why it doesn't recognizes the conf.py file even when is there.

Once this is working, it should be easy to integrate this with PR, as it is explined in the readthedocs documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants