GitHub Actions

Francis Chuang
2 min readApr 15, 2024

--

What is GitHub Actions?
GitHub Actions is a continuous integration and continuous delivery (aka CI/CD) platform that allows you to automate your build, test and deployment pipeline.

What does CI/CD achieve?
In software development, ensuring the reliability and stability of a service amidst changes and updates is paramount. This is where practices like unit testing, continuous integration (CI), and continuous deployment (CD) come into play.

Unit testing involves testing individual components or functions to confirm that they perform as intended. Continuous Integration (CI) takes this a step further by automating the testing process. With CI, automated tests run when the developer pushes a new change into the main codebase.

Once the code passes the rigorous tests set up in the CI pipeline, Continuous Deployment (CD) comes into action. CD automates the deployment of the code to a staging or development environment.

How to create GitHub Actions?
You must create a YAML file under your project’s .github/workflows, you can find a sample here

The workflow runs an automatic test in the above sample whenever you push a new commit into the repo. Many capabilities can be achieved, such as:
• A dedicated Test Pipeline
• A dedicated Deployment Pipeline
• Format, lint and type checked
• Only triggered when the particular file is modified
• Limited trigger when the branch is merged into the dev or prod

How to track the status?
You can see the result under Actions in your repo.

Conclusion
You have a big picture of how it works now. One of the benefits of using it is that you don’t have to integrate third parties, like Jenkins or Travis. You can put everything in one place and it looks neat and organized.

Happy coding!

--

--