From 0f632e3f55229645a46f24996eb6dad203e39e31 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sun, 30 Nov 2025 00:56:55 -0600 Subject: [PATCH] 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. --- .github/workflows/sync-openapi-docs.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sync-openapi-docs.yml b/.github/workflows/sync-openapi-docs.yml index e17c33131..d9c719278 100644 --- a/.github/workflows/sync-openapi-docs.yml +++ b/.github/workflows/sync-openapi-docs.yml @@ -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"