diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b4aa662ac0..e0c01b0eff 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,18 @@ jobs: with: node-version: '16.x' registry-url: 'https://registry.npmjs.org' - - run: npm ci + + - name: Cache dependencies + id: cache + uses: actions/cache@v3 + with: + path: ./node_modules + key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }} + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: npm ci --ignore-scripts + - run: npx nx clear-cache - run: npx nx affected:build --all --prod --parallel --max-parallel=3 - run: cd dist/libs/components && npm publish --verbose || exit_code=0