Skip to content

Commit cf39087

Browse files
Update README.md
1 parent 45318db commit cf39087

File tree

1 file changed

+51
-5
lines changed

1 file changed

+51
-5
lines changed

README.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,54 @@
1-
# React + Vite
1+
# CI/CD Pipeline with GitHub Actions, Google Cloud Run, and Google Artifact Registry
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+
This repository outlines the implementation of a robust CI/CD pipeline utilizing GitHub Actions for automated deployment processes. The project leverages Google Cloud services, specifically Google Artifact Registry (GAR) for Docker image storage and Google Cloud Run for deploying containerized applications.
44

5-
Currently, two official plugins are available:
5+
## 🚀 Overview of the Architecture
66

7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7+
The CI/CD pipeline facilitates a seamless flow from code commits in GitHub to live application deployment in Google Cloud Run. Below is a high-level overview of the components involved:
8+
9+
- **GitHub**: The central hub for managing the source code.
10+
- **GitHub Actions**: Responsible for automating the build and deployment workflows.
11+
- **Google Artifact Registry (GAR)**: Stores built Docker images.
12+
- **Google Cloud Run**: Handles the deployment and scaling of the application.
13+
14+
### Architecture Workflow
15+
```plaintext
16+
Code Update ➜ GitHub Action Trigger ➜ Docker Build ➜ Push to GAR ➜ Deploy on Cloud Run
17+
```
18+
19+
20+
## 🔄 Workflow Steps
21+
22+
1. **Code Commit**: Developers push code changes to the repository.
23+
2. **Trigger CI/CD Pipeline**: The push event triggers the GitHub Actions workflow.
24+
3. **Build Docker Image**: GitHub Actions builds a Docker image from the updated codebase.
25+
4. **Push to GAR**: The Docker image is pushed to Google Artifact Registry for secure storage.
26+
5. **Deployment to Cloud Run**: Google Cloud Run automatically pulls the latest image and deploys it, ensuring the application is live and up-to-date.
27+
6. **Monitoring & Notifications**: Developers receive notifications about the deployment status, including any errors or successful builds.
28+
29+
## 🚀 Benefits of this CI/CD Setup
30+
31+
- **Continuous Deployment**: Automates the deployment process, allowing for rapid iterations and updates without manual steps.
32+
- **Improved Collaboration**: Team members can work simultaneously on features without stepping on each other's toes, as changes are integrated smoothly.
33+
- **Faster Recovery**: In case of an issue, the unique versioned Docker images allow for quick rollbacks to a previous stable version.
34+
- **Enhanced Code Quality**: Automated testing can be integrated into the CI/CD pipeline to catch issues early in the development process.
35+
- **Cost-Effective Scaling**: Cloud Run's pay-as-you-go model allows for efficient resource usage based on actual traffic.
36+
37+
## 🛠️ Setting Up
38+
39+
To get started with this project, follow these steps:
40+
41+
1. **Clone the Repository**: Use the following command to clone the repository to your local machine:
42+
```bash
43+
git clone <repository-url>
44+
cd <repository-name>
45+
```
46+
2. **Make Changes**: Modify the codebase as needed. Ensure you test your changes locally before pushing.
47+
3. **Push Changes**: Commit your changes and push them to the main branch.
48+
```bash
49+
git add .
50+
git commit -m "Your commit message"
51+
git push origin main
52+
```
53+
4. **Monitor the Workflow**: Navigate to the Actions tab in your GitHub repository to monitor the progress of the CI/CD workflow and see the deployment status.
54+
5. **Access the Deployed App**: Once the deployment is complete, access your application via the URL provided by Google Cloud Run.

0 commit comments

Comments
 (0)