diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 88d2c70df..2d5daca47 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -22,9 +22,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' + cache: 'npm' - name: Install dependencies - run: npm install + run: npm ci - name: Lint MDX heading hierarchy run: npm run lint:mdx diff --git a/docker/Dockerfile b/docker/Dockerfile index ac7cc4a03..0deb1ea31 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,8 +10,8 @@ RUN npm install --global pm2 # Utilise Docker cache to save re-installing dependencies if unchanged COPY ./package*.json ./ -# Install dependencies -RUN npm install --production +# Install dependencies (npm ci = clean, reproducible install from the lockfile) +RUN npm ci --omit=dev # Copy all files COPY ./ ./