neuropoly / intranet.neuro.polymtl.ca

NeuroPoly's lab manual
https://intranet.neuro.polymtl.ca
4 stars 7 forks source link

Add deployments for PR branches to allow previewing changes before merging #70

Open joshuacwnewton opened 2 years ago

joshuacwnewton commented 2 years ago

Recently, changes were made to the website via commits directly to master. Seeing this, I wanted to recommend using GitHub's PR interface instead. But, then I noticed that there are currently no preview builds for PRs, meaning that PR contributors seemingly have to cross their fingers and hope the changes work before merging.

If there was a way to preview changes before merging (similar to how RTD does it for PRs), then I would feel a lot more comfortable recommending PRs for website changes.

joshuacwnewton commented 2 years ago

It seems as though there is an open discussion for this here: https://github.com/community/community/discussions/7730

And, it seems like the GitHub team is planning this on their roadmap, at least circa Dec 2021:

Hello! Just wanted to chime in here to confirm that this is something we have plans for. No ETA yet as it has not been committed to the roadmap but we are doing prep work in the next few months that will help us achieve this in the medium term.

joshuacwnewton commented 2 years ago

As for what we can do now... It looks like we're currently using the very stock "deploy from a branch" option for GitHub Pages:

image

It doesn't seem like this naturally allows for multiple branches.


That said, there is this comment (https://github.com/community/community/discussions/7730#discussioncomment-2121798) that says:

With a bit of fiddling around you can make your own deployment preview system just using basic GitHub actions

It's a bit complex/fiddly, though. I'm not sure if this is worth the effort yet, so I'm going to hold off on trying to implement anything.