Skip to content

This repository demonstrates a CI/CD workflow using GitHub Actions that runs lint checks, format checks, and test cases on every push to the master branch. It builds a production-ready Docker image, pushes it to Docker Hub, and deploys it to an AWS EC2 instance via SSH. The entire process is automated to ensure clean, consistent deployments.

Notifications You must be signed in to change notification settings

tazbin/ci-cd-pipeline

Repository files navigation

Node.js API for CI/CD with Github Action

This repository contains the code for a Node.js API. The setup includes a CI/CD pipeline configured with GitHub Actions for linting, formatting, running tests, and deploying the app to AWS EC2 on merge to master branch.

Prerequisites

Before running the project locally, make sure you have the following tools installed:

Setup

Clone this repository to your local machine:

git clone git@github.com:tazbin/ci-cd-pipeline.git
cd ci-cd-pipeline

Install the dependencies

npm install

Run the app

npm run start

Code Linting

Check code linting

npm run lint:check

Fix code linting

npm run lint:fix

Code Formatting

Check code Format

npm run format:check

Fix code Formatting

npm run format:fix

Run Test Cases

npm run test

About

This repository demonstrates a CI/CD workflow using GitHub Actions that runs lint checks, format checks, and test cases on every push to the master branch. It builds a production-ready Docker image, pushes it to Docker Hub, and deploys it to an AWS EC2 instance via SSH. The entire process is automated to ensure clean, consistent deployments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published