Skip to content

Commit

Permalink
Improved usage of npm ci command to install npm dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Sep 27, 2024
1 parent 19cbb77 commit b00fb19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
path: ${{ steps.npm-cache.outputs.dir }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
run: npm install
run: npm ci
- name: Install SARIF formatter for ESLint
run: npm install @microsoft/eslint-formatter-sarif@latest
- name: Run ESLint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
path: ${{ steps.npm-cache.outputs.dir }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
run: npm install
run: npm ci
- name: Build website
run: npm run build
- name: Setup Pages
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY --chown=node:node . .
# Use cache mount to speed up installation of existing dependencies
RUN --mount=type=cache,target=.npm \
npm set cache .npm && \
npm install && chown -R node:node ./node_modules
npm ci && chown -R node:node ./node_modules

# Use non-root user
USER node
Expand Down

0 comments on commit b00fb19

Please sign in to comment.