brunocroh / bolhadev.chat

A free platform for Brazilian developers to improve their English skills.
https://bolhadev.chat
183 stars 19 forks source link

Improve deploy action to just run when have changes on server project #24

Closed brunocroh closed 2 months ago

brunocroh commented 3 months ago

Actually backend is deployed on each new commit, so will be good if we can improve it to just deploy when have changes on apps/server/*

BIEMAX commented 3 months ago

Suggestion

You can disable direct commits to the main branch. Instead, create a secondary branch (e.g., named dev), so all PRs will first be merged into this new branch. After that, deploy to production.

All security checks can run in this branch too, avoiding duplicate checks in both branches (the main branch will be used only to deploy the application).

brunocroh commented 3 months ago

@BIEMAX Hey man, thank you for your Input.

I really do not like this approach of having a intermediate branch

Having this intermediate branch, is something more like Git Flow, and I really do no like it for web apps (The original author of git flow think the same, you can check the disclaimer on his original article)

Other reason is because the basic principle of Continuous Delivery is "Software is always in releasable state", if you have interest on it, this video will be awesome.

I believe that just will made us be more distant of our goal, ship fast.

Of course, even applying Git Flow, it would be good to have a ci/cd that does not perform unnecessary tasks to use fewer resources and be faster.

Any question or miss understanding of my side, let me know. Thank you again for your time and idea.

joaoreider commented 2 months ago

Hi! I would like to work on this issue. Could you please assign it to me? @brunocroh

brunocroh commented 2 months ago

Hi! I would like to work on this issue. Could you please assign it to me? @brunocroh

Yes sure, go ahead.