Skip to content

Commit a6bfb94

Browse files
committed
feat: git push job in action file
1 parent 3ae63e5 commit a6bfb94

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/api-spec-merger.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'specs/**'
77

88
permissions:
9-
contents: write # This is correct and grants the necessary permissions.
9+
contents: write
1010

1111
jobs:
1212
lint-and-bundle:
@@ -27,9 +27,17 @@ jobs:
2727
chmod +x scripts/generate-api-docs.sh
2828
./scripts/generate-api-docs.sh
2929
30-
- name: Commit and push changes
31-
uses: ad-m/github-push-action@master
32-
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }} # Use the correct, built-in secret
34-
branch: ${{ github.ref }}
35-
message: "docs: generate API documentation"
30+
- name: Commit and push documentation
31+
run: |
32+
git config --local user.email "[email protected]"
33+
git config --local user.name "GitHub Action"
34+
35+
git add docs/api-docs/
36+
37+
if git diff --staged --quiet; then
38+
echo "✅ No changes to commit"
39+
else
40+
git commit -m "📄 Update API documentation"
41+
git push origin gh-pages-test
42+
echo "🚀 Documentation pushed to gh-pages branch!"
43+
fi

specs/resourceRecommendation/ClusterResourceRecommendation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.1.0
22
info:
33
title: Resource Recommender
44
description: Analyzes the history of resource usage (such as CPU and memory) for Kubernetes workloads in a specific cluster and generates data-backed recommendations for optimal resource allocation.
5-
version: 0.0.2
5+
version: 0.0.1
66
servers:
77
- url: http://localhost:8080/orchestrator
88
description: Devtron API Server

0 commit comments

Comments
 (0)