# CI/CD with Github Actions

Github Actions is a Continuous Integration/Continuous Delivery  (CI/CD) platform. CI/CD is essentially an automation of the standard software development lifecycle. Rather than having to manually perform tasks like linting, formatting, and deployment, CI/CD platforms automate the process and allow you, as the developer, to focus on developing meaningful products, rather than worrying about fulfilling a checklist of actions.

You can use Github Actions to build a continuous integration and continuous delivery/deployment pipeline.

Every repo can have many workflows in the `.github/workflows` directory. You need to create the directory at the root folder. Each workflow is a `.yml` file using the YAML syntax. Each workflow can have a set of Jobs which itself has a set of steps. Each step is a single 'command' that is ran in order and depends on the step before it.

Official Github Actions documentation: <https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions>

## Why use CD?

Once the pipeline is set up properly, you can easily deploy your code to production automatically, saving a step in the development process.

## Examples

Here are a few examples of Github Actions:

* [Deploy Github Pages using Github Actions](https://github.com/nushackers/hackertools_materials/blob/main/.github/workflows/jekyll-gh-pages.yml)
* [Build and Deploy Telegram bot on AWS Lambda](https://github.com/francisyzy/foray-watch-bot/blob/master/.github/workflows/deploy.yml)
* [Build and Deploy Microservices on AWS EKS](https://github.com/francisyzy/ay2324s1-course-assessment-g33/blob/master/.github/workflows/project-deployment.yml)

A curated list of awesome things related to GitHub Actions: <https://github.com/sdras/awesome-actions>

{% hint style="info" %}
For more details, please look at [ci-cd-with-github-actions](https://wiki.nushackers.org/hackerschool/ci-cd-with-github-actions "mention")!
{% endhint %}
