Skip to content

adding some comments to yml, setting push trigger to client file #3

adding some comments to yml, setting push trigger to client file

adding some comments to yml, setting push trigger to client file #3

Workflow file for this run

name: Client
on:
push:
# only trigger Client build if files in client folder have changed
- client/**
jobs:
build:
runs-on: ubuntu-latest
steps:
# checkout repo so workspace can access it
- uses: actions/checkout@v4
# set up node
- uses: actions/setup-node@v4
with:
node-version: 20.16.0
# caching node modules to prevent installing each time
# checks if package-lock.json has changed before running npm ci
- name: Cache Dependencies
id: cache
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: client/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('client/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# install dep. if cache miss
- name: Install Dependencies
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
working-directory: ./client
run: npm ci
- name: List Node Modules
working-directory: ./client
run: npm list
- name: Build Client
working-directory: ./client
run: npm run build