diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 88c5f35..81a901d 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -28,7 +28,11 @@ jobs: run: | npm ci \ --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 run: npm run lint diff --git a/Dockerfile b/Dockerfile index cab7d75..0ba0247 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ ARG NPM_REGISTRY=https://package-mirror.liara.ir/repository/npm/ COPY package.json package-lock.json ./ RUN npm ci \ --registry="${NPM_REGISTRY}" \ - --replace-registry-host=registry.npmjs.org + --replace-registry-host=registry.npmjs.org \ + --include=optional COPY . . RUN npm run build