astropy/astropy-tutorials

Explore possibilities for linking the executed (with output) and rendered (HTML) notebooks in a PR

adrn opened this issue · 4 comments

adrn commented

The build artifacts from a PR's CI run should contain these things. Is there a resource we can use that will take the artifact, unzip it, and serve it at a url?

adrn commented

@Cadair: We used to use Giles to provide a link to our built Sphinx site in a PR. We've switched to using nbconvert more directly, but it would be cool to link to the converted/rendered HTML notebooks in a PR. Do you know of relevant infrastructure we could use to do that?

Well if you use circleci and upload the html from nbconvert to circleci's artifacts then you could still use giles as you can configure it to link to any file on circleci's aritfacts.

I am not aware of any other CI provider other than circle CI which lets you direct link to HTML pages and be able to see them in the browser without any issues, so that's why I say use circleci.

Maybe we could set up a staging server? Deploy into this repo's GitHub Pages with a directory prefixed by the PR number? We could even have a GitHub Actions workflow that cleans up the staged directory in gh-pages when a PR is closed.

There is the security concern of hosting content from PRs (though it wouldn't be highly visible and wouldn't be indexed by search engines, so it may be an acceptable risk)

You could but given that circle ci provides that feature for free why would you?