chore(deps): bump the minor group across 1 directory with 13 updates #74
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: NodeJS Checks | |
on: | |
push: | |
branches: [develop] | |
pull_request: | |
jobs: | |
build: | |
name: Build, Lint, Format, Tests and Build Docs | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x, 23.x] | |
steps: | |
# Checkout the repository | |
- uses: actions/checkout@v4 | |
# Setup Node.js environment | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "yarn" | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn install --immutable | |
# Run eslint | |
- name: Run ESLint | |
run: yarn lint | |
# Run prettier check | |
- name: Run Prettier | |
run: yarn format | |
# Run build | |
- name: Build project | |
run: yarn build | |
# Run tests | |
- name: Run tests | |
run: yarn test | |
# Build documentation only for Node.js 22.x | |
- name: Build documentation | |
if: matrix.node-version == '22.x' | |
run: yarn build:docs | |
# Upload documentation artifact (only for Node.js 22.x) | |
- name: Upload docs | |
if: matrix.node-version == '22.x' | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "docs" | |
docs: | |
name: Deploy Docs | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/develop' | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
# Deploy documentation to GitHub Pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |