overthesun / simoc-web

This is the web interface to SIMOC
https://ngs.simoc.space/
Other
3 stars 0 forks source link

Add a GitHub action to build and upload the frontend #173

Open ezio-melotti opened 2 years ago

ezio-melotti commented 2 years ago

While working on https://github.com/overthesun/simoc/issues/204, it occurred to me that instead of cloning the frontend, building the docker container, build the frontend, and copying it over in the local copy of the simoc repo, we could build and upload the frontend on GitHub, and then simply download it using simoc.py.

A few thoughts about this:

kstaats commented 2 years ago

If this works, it sounds like a really good idea.

On 8/31/22 19:29, Ezio Melotti wrote:

While working on https://github.com/overthesun/simoc/issues/204, it occurred to me that instead of cloning the frontend, building the docker container, build the frontend, and copying it over in the local copy of the simoc repo, we could build and upload the frontend on GitHub, and then simply download it using simoc.py.

A few thoughts about this:

  • The existing action already builds the frontend, and has commented-out code to create and upload an artifact.
  • The URL of artifacts is dynamic -- even though we could use GitHub APIs to figure it out, it might be better to upload it to a static place. One option is to upload it as a release. I'm not sure if we can create a static tag for the release (e.g. latest) or if we need incremental numeric tags (e.g. 1.5.0).
  • I'm not sure if building on one machine and copying it on another machine works, but we can test it and find out.
  • If we keep master stable, we could build and upload this automatically whenever a PR is merged, if not, we might create a manually-triggered action and only upload a new version when we know master is working fine.