This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Matrix Deployment | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
continue-on-error: true | |
strategy: | |
matrix: # So with that this job will run 9 times (in parallel by default). 3 node versions * 3 OS | |
my-node-version: [12, 14, 16] | |
my-os: [ubuntu-latest, windows-latest, macOS-latest] # some of them will fail, this is ok, this repo has some features that are not supported on some OS | |
include: # This single combination will be included | |
- my-node-version: 18 | |
my-os: ubuntu-latest | |
exclude: # This combination will be excluded from the matrix | |
- my-node-version: 12 | |
my-os: windows-latest | |
runs-on: ${{ matrix.my-os }} | |
steps: | |
- name: Get code | |
uses: actions/checkout@v3 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.my-node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build website | |
run: npm run build |