Share
Explore

Assignment 4 Training Document: Deploying a Simple Application with GitHub Actions

Objective: Demonstrate the use of GitHub Actions to automate the deployment of a simple application.
Task:
Use the existing JavaScript program (from Assignment 1).
Write a GitHub Action workflow file (.github/workflows/deploy.yml) that:
Runs tests using Jest (from Assignment 2).
Lints the code (using a tool like ESLint).
Deploys the application to a static hosting platform (e.g., GitHub Pages or Netlify).
Steps:
Add an ESLint configuration to the repository.
Configure the GitHub Action to:
Trigger on a push to the main branch.
Run Jest and ESLint in parallel.
Deploy to a static hosting service if tests and lint checks pass.
Deliverable:
A working GitHub Action workflow file.
A short report (1-2 pages) explaining the steps and how GitHub Actions automate the CI/CD pipeline.

Course Project: Comprehensive CI/CD Pipeline

Objective: Create a small CI/CD pipeline demonstrating all the learned components: code quality, testing, and deployment.
Task:
Use the JavaScript application enhanced in previous assignments.
Extend the CI/CD pipeline to include:
Building a Docker image for the application.
Pushing the Docker image to Docker Hub.
Deploying the application on a cloud platform (e.g., Heroku or AWS Elastic Beanstalk).
Steps:
Step 1: Write a Dockerfile for the application.
Step 2: Update the GitHub Action workflow to:
Build and test the application.
Build and push a Docker image to Docker Hub.
Trigger a deployment using the Docker image.
Step 3: Provide a README.md with clear instructions for running the project.
Deliverable:
The completed project repository with:
A functional GitHub Actions pipeline.
A Dockerfile.
A brief video (optional) demonstrating the workflow in action.
A summary report discussing the CI/CD pipeline and its components.

Key Considerations:

Keep all configurations simple and beginner-friendly.
Use public platforms and free-tier services to avoid complexities.
Provide students with example files (e.g., basic Dockerfile, GitHub Actions YAML, and ESLint configurations).
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.