Skip to content
Sverre edited this page Jun 8, 2021 · 2 revisions

GitHub Actions

GitHub Actions can automate software workflows using a .yml format. It can be used to build, test and deploy applications. Our CI/CD for Node applications is divided into two parts:

  1. Building the application
  2. Deploying to Docker Hub

1. Building the application

After creating a pull request or pushing directly to master the Build and Test workflow will trigger. This workflow runs the following commands:

  • Installing dependencies: npm install
  • Build the application: npm build

The results can be viewed in the logs if needed. This workflow is required to pass. If it does not pass, the pull request will be blocked.

2. Deploying to Docker Hub

This workflow only triggers when a new release is created in the repository. This workflow connects to Docker Hub and uploads an image based on the master branch. This image can then for example be used to run locally or to be deployed on a VM. Pull requests do not depend on this workflow, as it is only triggered by manual releases.

Clone this wiki locally