Skip to content

Workflow file for this run

---
name: nodejs build
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: clone the repo to $GITHUB_WORKSPACE directory
uses: actions/checkout@v4
- name: run some pre checks
run: |
ls -l && \
pwd && \
md5sum *json
- name: restore cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-{{ hashFiles('**/*lock.json' }}
restore-keys: |
${{ runner.os }}-npm
- name: install nodejs
uses: actions/setup-node@v4
with:
node-version: latest
- name: build the application
run: |
npm ci && \
npm run build --if-present
- name: make cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-{{ hashFiles('**/*lock.json' }}