@@ -223,13 +223,163 @@ jobs:
223223 echo "ℹ️ **No release created** - No releasable changes detected." >> $GITHUB_STEP_SUMMARY
224224 fi
225225
226+ # ============================================================================
227+ # DOCUMENTATION UPDATE
228+ # ============================================================================
229+ update-documentation :
230+ name : 📚 Update Documentation
231+ runs-on : ubuntu-latest
232+ needs : semantic-release
233+ if : needs.semantic-release.outputs.released == 'true'
234+ timeout-minutes : 10
235+ permissions :
236+ contents : write
237+ pull-requests : write
238+ steps :
239+ - name : 📥 Checkout Repository
240+ uses : actions/checkout@v4
241+ with :
242+ fetch-depth : 0
243+ token : ${{ secrets.GITHUB_TOKEN }}
244+
245+ - name : 🟢 Setup Node.js
246+ uses : actions/setup-node@v4
247+ with :
248+ node-version : ' 20'
249+ cache : ' npm'
250+ registry-url : ' https://registry.npmjs.org'
251+
252+ - name : 📦 Install Dependencies
253+ run : npm ci --prefer-offline --no-audit
254+
255+ - name : 📝 Update README Version Badges
256+ run : |
257+ echo "📝 Updating README version badges..."
258+ NEW_VERSION="${{ needs.semantic-release.outputs.version }}"
259+
260+ # Update npm version badge
261+ sed -i "s|npm/v/@dipseth/dataproc-mcp-server\.svg|npm/v/@dipseth/dataproc-mcp-server.svg|g" README.md
262+
263+ # Update package references in README
264+ sed -i "s|@dipseth/dataproc-mcp-server@[0-9]\+\.[0-9]\+\.[0-9]\+|@dipseth/dataproc-mcp-server@$NEW_VERSION|g" README.md
265+
266+ # Update installation commands
267+ sed -i "s|npm install -g @dataproc/mcp-server|npm install -g @dipseth/dataproc-mcp-server@$NEW_VERSION|g" README.md
268+
269+ echo "✅ README version badges updated to v$NEW_VERSION"
270+
271+ - name : 📚 Update Documentation Links
272+ run : |
273+ echo "📚 Updating documentation links..."
274+ NEW_VERSION="${{ needs.semantic-release.outputs.version }}"
275+
276+ # Update package.json version references in docs
277+ find docs/ -name "*.md" -type f -exec sed -i "s|@dipseth/dataproc-mcp-server@[0-9]\+\.[0-9]\+\.[0-9]\+|@dipseth/dataproc-mcp-server@$NEW_VERSION|g" {} \;
278+
279+ # Update docs/index.md with latest version
280+ if [ -f "docs/index.md" ]; then
281+ sed -i "s|version: [0-9]\+\.[0-9]\+\.[0-9]\+|version: $NEW_VERSION|g" docs/index.md
282+ fi
283+
284+ echo "✅ Documentation links updated"
285+
286+ - name : 🔄 Regenerate Documentation
287+ run : |
288+ echo "🔄 Regenerating documentation..."
289+
290+ # Regenerate API documentation with new version
291+ npm run docs:generate
292+
293+ # Update GitHub Pages if needed
294+ if [ -f "docs/_config.yml" ]; then
295+ sed -i "s|version: [0-9]\+\.[0-9]\+\.[0-9]\+|version: ${{ needs.semantic-release.outputs.version }}|g" docs/_config.yml
296+ fi
297+
298+ echo "✅ Documentation regenerated"
299+
300+ - name : 📊 Update Package Metrics
301+ run : |
302+ echo "📊 Updating package metrics..."
303+ NEW_VERSION="${{ needs.semantic-release.outputs.version }}"
304+
305+ # Create or update package info file
306+ cat > docs/package-info.json << EOF
307+ {
308+ "name": "@dipseth/dataproc-mcp-server",
309+ "version": "$NEW_VERSION",
310+ "released": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
311+ "npmUrl": "https://www.npmjs.com/package/@dipseth/dataproc-mcp-server/v/$NEW_VERSION",
312+ "githubRelease": "https://github.com/${{ github.repository }}/releases/tag/v$NEW_VERSION",
313+ "installCommand": "npm install @dipseth/dataproc-mcp-server@$NEW_VERSION"
314+ }
315+ EOF
316+
317+ echo "✅ Package metrics updated"
318+
319+ - name : 🚀 Update NPM Documentation
320+ run : |
321+ echo "🚀 Updating NPM package documentation..."
322+
323+ # Ensure package.json has correct repository and homepage URLs
324+ npm pkg set homepage="https://dipseth.github.io/dataproc-mcp/"
325+ npm pkg set repository.url="git+https://github.com/${{ github.repository }}.git"
326+ npm pkg set bugs.url="https://github.com/${{ github.repository }}/issues"
327+
328+ # Update package keywords for better discoverability
329+ npm pkg set keywords='["mcp", "dataproc", "google-cloud", "model-context-protocol", "typescript", "nodejs"]'
330+
331+ echo "✅ NPM documentation metadata updated"
332+
333+ - name : 📝 Create Documentation Update Summary
334+ run : |
335+ echo "## 📚 Documentation Update Summary" >> $GITHUB_STEP_SUMMARY
336+ echo "" >> $GITHUB_STEP_SUMMARY
337+ echo "Updated documentation for version **v${{ needs.semantic-release.outputs.version }}**:" >> $GITHUB_STEP_SUMMARY
338+ echo "" >> $GITHUB_STEP_SUMMARY
339+ echo "### ✅ Updated Components" >> $GITHUB_STEP_SUMMARY
340+ echo "- 📝 README.md version badges and installation commands" >> $GITHUB_STEP_SUMMARY
341+ echo "- 📚 Documentation links and version references" >> $GITHUB_STEP_SUMMARY
342+ echo "- 🔄 Regenerated API documentation" >> $GITHUB_STEP_SUMMARY
343+ echo "- 📊 Package metrics and metadata" >> $GITHUB_STEP_SUMMARY
344+ echo "- 🚀 NPM package documentation" >> $GITHUB_STEP_SUMMARY
345+ echo "" >> $GITHUB_STEP_SUMMARY
346+ echo "### 🔗 Updated Links" >> $GITHUB_STEP_SUMMARY
347+ echo "- **NPM Package**: [v${{ needs.semantic-release.outputs.version }}](https://www.npmjs.com/package/@dipseth/dataproc-mcp-server/v/${{ needs.semantic-release.outputs.version }})" >> $GITHUB_STEP_SUMMARY
348+ echo "- **GitHub Pages**: [Documentation](https://dipseth.github.io/dataproc-mcp/)" >> $GITHUB_STEP_SUMMARY
349+ echo "- **Installation**: \`npm install @dipseth/dataproc-mcp-server@${{ needs.semantic-release.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
350+
351+ - name : 💾 Commit Documentation Updates
352+ run : |
353+ # Configure git
354+ git config --local user.email "[email protected] " 355+ git config --local user.name "GitHub Action"
356+
357+ # Check if there are changes to commit
358+ if git diff --quiet && git diff --staged --quiet; then
359+ echo "ℹ️ No documentation changes to commit"
360+ else
361+ echo "📝 Committing documentation updates..."
362+ git add .
363+ git commit -m "docs: update documentation for v${{ needs.semantic-release.outputs.version }}
364+
365+ - Update README version badges and installation commands
366+ - Update documentation links and version references
367+ - Regenerate API documentation
368+ - Update package metrics and NPM metadata
369+
370+ [skip ci]"
371+
372+ git push origin main
373+ echo "✅ Documentation updates committed and pushed"
374+ fi
375+
226376 # ============================================================================
227377 # POST-RELEASE VALIDATION
228378 # ============================================================================
229379 post-release-validation :
230380 name : ✅ Post-Release Validation
231381 runs-on : ubuntu-latest
232- needs : semantic-release
382+ needs : [ semantic-release, update-documentation]
233383 if : needs.semantic-release.outputs.released == 'true'
234384 timeout-minutes : 10
235385 steps :
0 commit comments