plantuml / plantuml.js

PlantUML that runs completely on javascript without needing java/servers
https://plantuml.github.io/plantuml.js/
MIT License
215 stars 37 forks source link

Use branch name when publish #29

Closed arnaudroques closed 1 year ago

arnaudroques commented 1 year ago

Would it be possible to use branch name when publishing the demo ?

This way https://plantuml.github.io/plantuml-wasm/ would become https://plantuml.github.io/plantuml-wasm/main/

The interest is that we will be able to work on a different branch when developping (let's say develop).

So we could test the result here https://plantuml.github.io/plantuml-wasm/develop/

Once it will work on the branch, we will merge it into main.

This way https://plantuml.github.io/plantuml-wasm/main/ will always be working.

Since we would like to make an official announcement, we must provide something always on for users. I'm sure it will make some noise :-)

@sakirtemel Could we put your name in this future announcement, you definitively deserve a huge kudos !

sakirtemel commented 1 year ago

I actually thought about the same, what we need is some sort of a Review Apps / environments. I haven't done it in Github Pages before, but I worked a lot with that especially in Heroku. Technically, it's possible, I'll prioritize that, as I wanted to also work on faster page publishing. The ideal flow would be, whenever there's a new PR, it should generate a new link specific to that PR/branch.

Since we would like to make an official announcement, we must provide something always on for users. I'm sure it will make some noise :-)

Super exciting! Are you considering to have a separate subdomain for that, or it should rather live under github.io ?

Also, for before launch, I sent an email to cheerpj to be clear about their licenses (it's free to experiment or it's free for non-profit). I'll keep you posted.

@sakirtemel Could we put your name in this future announcement, you definitively deserve a huge kudos !

😊 it was actually a pleasure to work together for me. I'd be happy to be listed as a contributor there :)

arnaudroques commented 1 year ago

I actually thought about the same, what we need is some sort of a Review Apps / environments. I haven't done it in Github Pages before, but I worked a lot with that especially in Heroku. Technically, it's possible, I'll prioritize that, as I wanted to also work on faster page publishing. The ideal flow would be, whenever there's a new PR, it should generate a new link specific to that PR/branch.

Great, take your time do find the best/easiest solution. Whether it's a PR or a branch is fine for us. Just tell us when it will be ready.

Super exciting! Are you considering to have a separate subdomain for that, or it should rather live under github.io ?

No, we can stay live on github.io The real end goal is that it will be integrated natively by GitHub for all projects hosted by them, so let's stick to github.io (even if they will probably duplicate this on their own internal infrastructure gin that case) In the meantime, I'm sure a lot of developers will use this for their projects and create new plugins.

Also, for before launch, I sent an email to cheerpj to be clear about their licenses (it's free to experiment or it's free for non-profit). I'll keep you posted.

Would you mind forward me a copy of that email (plantuml@gmail.com)? I also wrote to them :-) I will copy you on my future emails if you wish.

blush it was actually a pleasure to work together for me.

Pleasure 100% shared! I can't believe it only took a few days to get a fully functional solution!

sakirtemel commented 1 year ago

Deploy preview option is coming soon to github:

in the meantime, we may create a separate repo for publishing development version of the pages. so, let's say, a new commit is made on the development branch, it automatically builds the code and publish the static files to the another repository which has a separate github pages connected to it.

there are also other options to use the same repository, such as using Netlify (not sure if they support serving jar files thoug), Vercel or Cloudflare pages. One last option is to use an action that deploys to the same github pages, but different folders, however, it endangers the production build.

my current workaround solution would be having a separate repo for the non-production builds, what are your thoughts o all these options?

still researching about that, if I find a different way I'll write it here.

arnaudroques commented 1 year ago

my current workaround solution would be having a separate repo for the non-production builds, what are your thoughts o all these options?

Make sense. Just created https://github.com/plantuml/plantuml-wasm-dev :-)

sakirtemel commented 1 year ago

thanks @arnaudroques

So, it works now like this:

  1. Created an example PR
  2. It automatically added a comment for the Preview link for this PR(after the comment, it takes a few seconds to have it deployed)
  3. Deployed it automatically into the other repository
  4. It can be accessed via https://plantuml.github.io/plantuml-wasm-dev/pr-35/
  5. Commit for each PR can be verified with this link: https://plantuml.github.io/plantuml-wasm-dev/pr-35/LAST_COMMIT.js (or in console with window.GIT_COMMIT, I can also put that on the screen)
  6. And the folder will be deleted when the PR is closed

I'm closing the issue now, but please try it and let me know if anything is broken/missing :)