Skip to content

Migrate to Node.js v20 #46

Migrate to Node.js v20

Migrate to Node.js v20 #46

Workflow file for this run

---
name: "Node.js CI"
on:
pull_request:
branches:
- "main"
push:
branches:
- "main"
jobs:
check:
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-node@v3"
with:
cache: "npm"
node-version: "20"
- run: "npm ci"
- run: "npm run lint"
- run: "npm run test:cover"
- run: "npm run build"
- uses: "actions/upload-artifact@v3"
with:
if-no-files-found: "error"
name: "build-output"
path: "lib/"
deploy:
needs:
- "check"
if: "github.ref == 'refs/heads/main'"
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-node@v3"
with:
cache: "npm"
node-version: "20"
- run: "npm ci --omit dev"
- uses: "actions/download-artifact@v3"
with:
name: "build-output"
path: "lib/"
- run: "npm install --global netlify-cli"
- run: "netlify deploy --dir . --prod true"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}