astropy / astropy-tutorials

Tutorials for the Astropy Project
BSD 3-Clause "New" or "Revised" License
288 stars 171 forks source link

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

Open adrn opened 2 years ago

adrn commented 2 years ago

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 2 years ago

@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?

Cadair commented 2 years ago

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.

jonathansick commented 2 years ago

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)

Cadair commented 2 years ago

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