Get Started With CI/CD Using GitHub Actions

Get Started With CI/CD Using GitHub Actions

In this introduction to GitHub Actions, we’ll explore how to build and deploy a Python Flask application to AWS Elastic Beanstalk.

Welcome to the first part of a series of articles comparing CI/CD platforms. To help evaluate, compare and contrast the tools currently dominating the market, the goal will be to automate the deployment of a Flask application onto AWS Elastic Beanstalk. A new deployment will need to occur after every push to main branch, and during the series this same requirement will be implemented across a multitude of CI/CD tools.

First up, part 1 will focus on GitHub Actions, where the support for CI/CD was first announced in August 2019. I’ll document the steps taken along the way to achieve the goal with GitHub Actions, and there’s a write up of the positives and negatives in a conclusion at the end of this article.

Our application

The Flask application

Our Flask application is a simple “Hello World” example, and for the purposes of demonstrating running unit tests within the pipeline, we have included a test case as well.

AWS Elastic Beanstalk

Our Flask application is going to be deployed to AWS Elastic Beanstalk which is a service that automates the deployment and scaling of a web application. It takes in our source code and takes care of all the infrastructure configuration.

There’s a handy CLI for Elastic Beanstalk, and ultimately we’re going to automate the following commands into our pipeline. However, these are just for reference and you do not need to run these now.

$ eb init -p python-3.6 hello-world --region us-east-1
$ eb create hello-world-env

Introduction to GitHub Actions

Introduction to GitHub Actions…

  • An event *will trigger a *workflow.
  • workflow *contains one or more *jobs.
  • job *is executed on a *runner *and will contain one or more *steps.
  • A *step *will contain a single *action *or a series of inline commands.
  • The run can generate artifacts *and use a *cache.


A job _runner _is any machine with the GitHub Actions Runner Application installed — these machines can be GitHub-hosted or you can run your own.

GitHub-hosted runners are virtual machines — Linux (Ubuntu), Windows, and macOS — and are fully managed by GitHub and come with a lot of installed software. For example, the image for Ubuntu comes armed with multiple libraries, including the AWS CLI and Google SDK. As part of the free-tier, GitHub provides 2,000 minutes per month of its hosted runners.

The runner is defined in the workflow yaml with the runs-on property.

devops aws github-actions elastic-beanstalk continuous-delivery

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Deploy using Github Actions on AWS Elastic BeanStalk

In this article I’d be going through the process of deploying Node application on AWS Elastic BeanStalk using Github Actions.

How to Manually Trigger a GitHub Actions Workflow

Earlier this week, GitHub announced a new feature which allows developers to trigger workflows manually from within the “Actions” tab. This has been one of the most heavily requested features for some time now, with the official support thread attracting hundreds of upvotes over the last 12 months — so does it deliver all that’s been promised? The short answer is yes, but not without a few pitfalls. Let’s dive in. Option 1: Basic Setup To create your first manual workflow, you’ll want to use the new workflow_dispatch trigger: A very simple manual workflow trigger. Once you add this file to your repository, you’ll be able to see and manually run the workflow from the “Actions” tab on GitHub: First select “Actions”, then “My First Manual Workflow”, then “Run workflow” followed by the “Run workflow” button. You’ll also notice that you can customise the branch to run your manual workflow against, however be advised that at least some variation of the workflow file must be on your default branch (e.g master) for it to appear in the “Actions” tab. Selecting a custom branch will: Checkout the latest commit from that branch. Use the branch’s own variation of the workflow file (if modified).

Measuring DevOps Metrics: A How-To Guide

DevOps is supposed to help streamline the process of taking code changes and getting them to production for users to enjoy. But what exactly does it mean for the process to be "streamlined"? One way to answer this is to start measuring metrics.

How to Manually Trigger a GitHub Actions Workflow

Earlier this week, GitHub announced a new feature which allows developers to trigger workflows manually from within the “Actions” tab.

Enable Continuous Delivery of Your Résumé with GitHub Actions

Enable Continuous Delivery of Your Résumé with GitHub Actions. My résumé lives in a private GitHub repository. I use TeX, which is a popular typesetting language, to compose my résumé. GitHub has now patched this disconnect between your code and the DevOps services with a new feature named GitHub Actions.