fix(ci): correct swagger path + add deploy concurrency guard
Iteration 2 fix: /api/swagger → /swagger (correct ASP.NET default). Iteration 3 — Concurrency guard: - concurrency group 'deploy-production': ensures only one deploy runs at a time (cancel-in-progress: false so queued deploys wait instead of being cancelled). - Why: prevents race conditions when CI-triggered workflow_run and manual workflow_dispatch overlap. Without this, parallel deploys could corrupt docker compose state or conflict on shared resources (ports, volumes, version tags).
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
name: Deploy to Production
|
name: Deploy to Production
|
||||||
run-name: 🚀 Deploy ${{ inputs.bump_version || 'patch' }} by @${{ gitea.actor }}
|
run-name: 🚀 Deploy ${{ inputs.bump_version || 'patch' }} by @${{ gitea.actor }}
|
||||||
|
|
||||||
|
# ── Concurrency: one deploy at a time, cancel queued ones ──
|
||||||
|
# Why: prevents race conditions when CI triggers deploy while
|
||||||
|
# a manual deploy is still running. The latest deploy wins.
|
||||||
|
concurrency:
|
||||||
|
group: deploy-production
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
# ───────────────────────────────────────────────────
|
# ───────────────────────────────────────────────────
|
||||||
# Trigger: automatic after CI success, or manual dispatch.
|
# Trigger: automatic after CI success, or manual dispatch.
|
||||||
# Runner: uses ubuntu-latest label (consistently present on
|
# Runner: uses ubuntu-latest label (consistently present on
|
||||||
@@ -203,9 +210,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check "/dashboard" "Dashboard" 200
|
check "/dashboard" "Dashboard" 200
|
||||||
check "/health" "Health API" 200
|
check "/health" "Health API" 200
|
||||||
check "/api/swagger" "API Swagger" 200
|
check "/swagger" "API Swagger" 200
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Results: $PASS passed, $FAIL failed"
|
echo "Results: $PASS passed, $FAIL failed"
|
||||||
|
|||||||
Reference in New Issue
Block a user