Skip to content

adding dotenv to client and server files, package not installed in gi… #7

adding dotenv to client and server files, package not installed in gi…

adding dotenv to client and server files, package not installed in gi… #7

Workflow file for this run

name: Client
on:
push:
# trigger on pull requests
pull_request:
branches:
- main
path:
- .github/workflows/client.yml
- client/**
# only trigger build for specific paths
paths:
- .github/workflows/client.yml
- 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