Tldr
Continuous Integration (CI) pipeline for a Gatsby project using GitHub Actions.
🌐 Overview
In this guide, we will set up a continuous integration (CI) pipeline for aGatsby project usingGitHubActions.
📝 Configuration
⊹ Matrix Strategy
The matrix strategy in GitHub Actions allows you to define a set of variables and their possible values. It creates a matrix of jobs, where each combination of the defined variables will result in a separate job being executed.
In the given code, thematrix strategy is used to define two variables: check
and node
. The check
variable has two possible values: 'type:check'
and 'format:check'
. The node
variable has two possible values: '18'
and '20'
. This means that a total of four jobs will be created, representing all possible combinations of the check
and node
variables.
This matrix strategy is useful when you want to run a set of jobs with different configurations or test against multiple versions of a dependency. It helps to reduce duplication in your workflow file and allows for efficient parallel execution of jobs.