fix(ci): install Sharp platform dependencies
This commit is contained in:
@@ -28,7 +28,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm ci \
|
npm ci \
|
||||||
--registry="https://package-mirror.liara.ir/repository/npm/" \
|
--registry="https://package-mirror.liara.ir/repository/npm/" \
|
||||||
--replace-registry-host=registry.npmjs.org
|
--replace-registry-host=registry.npmjs.org \
|
||||||
|
--include=optional
|
||||||
|
|
||||||
|
- name: Verify image optimizer dependency
|
||||||
|
run: node -e "const sharp = require('sharp'); if (!sharp.format.webp.output) throw new Error('Sharp WebP output is unavailable')"
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ ARG NPM_REGISTRY=https://package-mirror.liara.ir/repository/npm/
|
|||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm ci \
|
RUN npm ci \
|
||||||
--registry="${NPM_REGISTRY}" \
|
--registry="${NPM_REGISTRY}" \
|
||||||
--replace-registry-host=registry.npmjs.org
|
--replace-registry-host=registry.npmjs.org \
|
||||||
|
--include=optional
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|||||||
Reference in New Issue
Block a user