Skip to content

Create deployment.yml #11

Create deployment.yml

Create deployment.yml #11

name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x] # Include 20.x if it's available and stable by the time of your implementation
steps:
- uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Run Tests
run: npm test