FRUK-Simulator / Simulator

First Robotics UK Simulator
https://sim.morethanrobots.uk/
MIT License
5 stars 17 forks source link

ci: fix deployments by build outDir changed to `build` and re-enabling artifact generation #293

Open immutable-pro opened 3 months ago

immutable-pro commented 3 months ago

What's going on?

The machine where the website is deployed is periodically checking for the existence of an artifact.zip file, containing a build folder inside, with the required assets for the deployment.

A manual Github workflow has been added to trigger the release.

immutable-pro commented 3 months ago

Looking great, thanks for putting it all together.

Only question before approve, is that is this going to be deployed to the one and only environment for kobot? Which is essentially production?

We might want to double check with FIRST to see if it's fine to override the current legacy site if that's the case.

Long term speaking it would be great to have this CI deployed to dev or uat environment, and have a prod deploy manually triggered.

Yes, you are right. I thought about that too. It is a bit ...aggressive.

Before merging, I was going to suggest a "plan B" approach that consists of:

For that purpose, I would need admin access of the repo, as I can't see how GitHub pages is set up today, if at all.

owen26 commented 3 months ago

Yes, you are right. I thought about that too. It is a bit ...aggressive.

Before merging, I was going to suggest a "plan B" approach that consists of:

  • Use GitHub pages as a deployment preview.
  • Only generate artifacts.zip when a certain tag is created in GitHub, so we can control PROD deployments.

For that purpose, I would need admin access of the repo, as I can't see how GitHub pages is set up today, if at all.

Yes this looks like a great plan. The current site is totally static so GitHub Pages would be a good fit for deployment. It might also has the extra benefit for not being blocked by our VPN cuz I think Netlify on the other hand is blocked.

For production deployment yes we can either generate artifact when a tag is generated. (aka. feat or fix commit involved)

Alternatively, we can also have the artifact build workflow targeting on: workflow_dispatch trigger on github, so we can get a manual "Run workflow" button to make prod deployment.