Skip to content

Commit dca5f35

Browse files
gregjkalclaude
andcommitted
Add npm caching and retry settings to publish workflow
Reduce sporadic 403 failures during npm ci by caching npm packages across runs with actions/setup-node and configuring aggressive retry settings for transient registry errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d39c29f commit dca5f35

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ jobs:
6060
with:
6161
fetch-depth: 10
6262

63+
- name: Setup Node.js
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: '20'
67+
cache: 'npm'
68+
cache-dependency-path: |
69+
package-lock.json
70+
antora-ui/package-lock.json
71+
72+
- name: Configure npm retry settings
73+
run: |
74+
npm config set fetch-retries 5
75+
npm config set fetch-retry-mintimeout 5000
76+
npm config set fetch-retry-maxtimeout 60000
77+
6378
- name: Environment
6479
id: build
6580
shell: bash

0 commit comments

Comments
 (0)