mocha icon indicating copy to clipboard operation
mocha copied to clipboard

🚀 Feature: Deploy docs of major releases to their own subdomains

Open boneskull opened this issue 6 years ago • 4 comments

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 npm latest tag points to (currently v5.2.0). No subdomain; this is the "official" site
  • master: This will always reflect master
  • next: Whatever the npm next tag points to (currently v6.0.0-0)
  • v5 and v6: Pointing to two new npm tags with these respective names. Next major would be v7. 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.

boneskull avatar Jan 01 '19 21:01 boneskull

I can help this, but I can't access Netlify.

outsideris avatar Jan 04 '19 03:01 outsideris

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

Munter avatar Jan 05 '19 11:01 Munter

@outsideris I invited you as an admin of the netlify project for mocha

Munter avatar Jan 05 '19 11:01 Munter

@Munter Thank you.

I will research them in my own netlify in advance.

outsideris avatar Jan 07 '19 15:01 outsideris