The workflow is broken down into two sequential and automated jobs:
| Step | Tool/Service | Description |
|---|---|---|
| Code Commit | Developer GitHub | The developer pushes their Node.js or other application code to the GitHub repository, which triggers the pipeline. |
| Build Docker Image | GitHub Actions | GitHub Actions runs the Build Job. It takes the application code and builds a standardized Docker Image. |
| Push Image | Docker Hub | The newly built image is immediately pushed to Docker Hub (our container registry). This action makes the image available for deployment and serves as the single source of truth for the application artifact. |
| Step | Tool/Service | Description |
|---|---|---|
| Trigger | GitHub Actions | The deployment process "Triggers after Build Job" completes successfully, ensuring only successful builds are deployed. |
| Deployment Runner | Amazon EC2 (Self-hosted Runner) | The Deploy Job utilizes a Configured self-hosted runner on EC2. This instance connects back to GitHub Actions to execute the deployment commands securely within the AWS environment. |
| Run Container | Docker Hub EC2 | The runner performs a Pull Image from Docker Hub and then uses the Docker engine on the EC2 instance to Run Docker Image as a container. |
This architecture delivers a cutting-edge deployment capability:
This solution represents the best practices in modern cloud application delivery.