Skip to content

DevOps

The Hybr1d Frontend repository leverages GitHub Actions for CI/CD, ensuring a streamlined and automated process for building, testing, and deploying our applications. We have distinct workflows for production, staging, and development environments, utilizing AWS for deployments.

GitHub Actions for CI/CD

GitHub Actions play a crucial role in our CI/CD pipeline, automating our software delivery process.

Workflow Example: Production Deployment

When a Pull Request is merged into the main branch, it triggers a GitHub Action for production deployment.

name: production-deploy
on:
push:
branches: [main]
# Environment variables and jobs follow...

This action performs several steps:

Set Up Environment: Configures environment variables like API endpoints, page titles, and tokens. Install and Build: Installs dependencies and builds the React application. AWS Configuration: Sets up AWS credentials for deployment. Deployment to S3: Syncs the build output to an S3 bucket. CloudFront Cache Invalidation: Invalidates the CloudFront distribution to ensure the latest build is served. Notifications: Sends a Slack notification indicating the success or failure of the build.

Importance of CI/CD

  • Automation: Reduces manual intervention, increasing efficiency.
  • Consistency: Ensures consistent and reliable deployment processes.
  • Rapid Feedback: Provides quick feedback on code changes, aiding in early detection of issues.

AWS for Deployments

Our deployment strategy involves several AWS services:

  • Amazon S3: Hosts the build output of our applications.
  • Amazon CloudFront: Serves as the content distribution network, improving load times and providing a cache mechanism.
  • AWS Route 53: Manages DNS, routing users to the CloudFront distribution.

Deployment Process

  • S3 Bucket: The GitHub Action uploads the build artifacts to a specified S3 bucket.
  • CloudFront Distribution: CloudFront delivers the application content to end-users, with Route 53 managing the domain name system.

Monitoring and Notifications

  • Slack Integration: GitHub Actions integrate with Slack to send notifications upon the completion of deployment processes, keeping the team informed about the deployment status in the #alerts-deploy channel