We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07f3623 commit 0028656Copy full SHA for 0028656
.github/workflows/deploy-docs.yml
@@ -93,6 +93,7 @@ jobs:
93
# 发布 NPM 包(仅在 API 有变化时)
94
- name: Publish NPM Package
95
if: success() && steps.check_api.outputs.api_changed == 'true'
96
+ continue-on-error: true
97
env:
98
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
99
run: |
@@ -108,8 +109,15 @@ jobs:
108
109
110
cd npm
111
echo "📦 Publishing to NPM..."
- npm publish --access public
112
- echo "✅ Published successfully"
+
113
+ # 尝试发布,捕获错误但不中断工作流
114
+ if npm publish --access public 2>&1; then
115
+ echo "✅ Published successfully"
116
+ else
117
+ echo "⚠️ NPM publish failed (version may already exist or token issue)"
118
+ echo "ℹ️ Continuing workflow..."
119
+ exit 0
120
+ fi
121
122
# 4. 复制私有仓库的文件到当前仓库
123
- name: Copy files from Private Repository
0 commit comments