neuropoly/intranet.neuro.polymtl.ca

Add deployments for PR branches to allow previewing changes before merging

joshuacwnewton opened this issue · 2 comments

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.

It seems as though there is an open discussion for this here: community/community#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.

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 (community/community#7730 (comment)) 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.