Skip to content

Commit 0f632e3

Browse files
author
Mauricio Siu
committed
chore: update OpenAPI sync workflow to always commit changes
- Modified the workflow to always commit the OpenAPI specification to the website repository, even if no changes are detected. - Enhanced the copy command to force overwrite the existing openapi.json file. - Improved commit message formatting by allowing empty commits to ensure consistency in the sync process.
1 parent 8728d4b commit 0f632e3

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

.github/workflows/sync-openapi-docs.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,21 @@ jobs:
4949
5050
cd website-repo
5151
52-
# Copia el openapi.json al website
52+
# Copia el openapi.json al website (sobrescribe)
5353
mkdir -p public
54-
cp ../openapi.json public/openapi.json
54+
cp -f ../openapi.json public/openapi.json
5555
5656
# Configura git
5757
git config user.name "Dokploy Bot"
5858
git config user.email "bot@dokploy.com"
5959
60-
# Verifica si hay cambios
61-
if git diff --quiet public/openapi.json; then
62-
echo "📝 No changes detected in website repo"
63-
exit 0
64-
fi
65-
66-
# Commitea y pushea
60+
# Agrega y commitea siempre
6761
git add public/openapi.json
6862
git commit -m "chore: sync OpenAPI specification [skip ci]" \
6963
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
70-
-m "Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
64+
-m "Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
65+
--allow-empty
66+
7167
git push
7268
7369
echo "✅ OpenAPI synced to website successfully"

0 commit comments

Comments
 (0)