mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
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.
This commit is contained in:
16
.github/workflows/sync-openapi-docs.yml
vendored
16
.github/workflows/sync-openapi-docs.yml
vendored
@@ -49,25 +49,21 @@ jobs:
|
||||
|
||||
cd website-repo
|
||||
|
||||
# Copia el openapi.json al website
|
||||
# Copia el openapi.json al website (sobrescribe)
|
||||
mkdir -p public
|
||||
cp ../openapi.json public/openapi.json
|
||||
cp -f ../openapi.json public/openapi.json
|
||||
|
||||
# Configura git
|
||||
git config user.name "Dokploy Bot"
|
||||
git config user.email "bot@dokploy.com"
|
||||
|
||||
# Verifica si hay cambios
|
||||
if git diff --quiet public/openapi.json; then
|
||||
echo "📝 No changes detected in website repo"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Commitea y pushea
|
||||
# Agrega y commitea siempre
|
||||
git add public/openapi.json
|
||||
git commit -m "chore: sync OpenAPI specification [skip ci]" \
|
||||
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
||||
-m "Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
|
||||
-m "Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
|
||||
--allow-empty
|
||||
|
||||
git push
|
||||
|
||||
echo "✅ OpenAPI synced to website successfully"
|
||||
|
||||
Reference in New Issue
Block a user