Discussion about this post

User's avatar
Neural Foundry's avatar

Excellent breakdown of the Github Actions workflow! Your point about running builds directly on the EC2 instance is something many devlopers overlook when setting up their first CI/CD pipline.

What's particularly smart is flagging the memory constraint issue with npm install on smaller instances. In practice, buildingon the GitHub runner and then pushing the artifact eliminates not just memory concerns but also keeps your production server more predictable since you're not competing with user traffic during deploy cycles.

One thing worth considering: even with the simpler pull-build-restart pattern, you can still get decent uptime by using PM2's cluster mode with reload instead of restart, which does a rolling restart of worker processes.

Expand full comment
1 more comment...

No posts

Ready for more?