mocha
mocha copied to clipboard
🚀 Feature: Deploy docs of major releases to their own subdomains
Currently, only the mochajs.org branch will be published whenever it's updated. That's fine for ensuring our site doesn't reflect master, but what we should really do is have multiple sites--e.g., one for v5.x and another for v6.x.
Netlify can do this automatically based on branch name; it creates a slug of the branch name and uses that for the subdomain. We can then allowlist the branches to deploy. So, I propose maintaining these branches (which map to <branch>.mochajs.org):
latest: Whatever release npmlatesttag points to (currentlyv5.2.0). No subdomain; this is the "official" sitemaster: This will always reflectmasternext: Whatever the npmnexttag points to (currentlyv6.0.0-0)v5andv6: Pointing to two new npm tags with these respective names. Next major would bev7. We'd need to keep these branches pointing to the latest git tags for each major. This does not imply we will maintain old versions of Mocha; just that the reference material will still exist.
This will require some documentation and/or automation around publishing.
This can be setup in Netlify's UI, and I'll do it if I can get it to update our branches. but if anyone in @mochajs/core would like to help, go right ahead. if you don't have access to our Netlify site and want it, please let me know and I'll add you.
I can help this, but I can't access Netlify.
I have already done a bit of research into what might be possible with netlify. Sadly there is no ability to create netlify deploys based on git tags, which would be the preferable flow with npm packages.
However, I think we can certainly make a setup where we, in a simple approximation of this suggestion, put semver major branches in place at the latest version of a major v2, v3, v4 etc (for the ones that are netlify deployable). This would give us the ability to link to the subdomain and possible even proxy the documentation through mochajs.org/versions/v4.
I'm a bit in doubt about how to achieve the setup with latest, next and master, but the idea is good. We'll just need to figure something out where we preferably don't have to remember a whole lot of manual steps in the day-to-day workflow
@outsideris I invited you as an admin of the netlify project for mocha
@Munter Thank you.
I will research them in my own netlify in advance.