fix(ci): add needs clause to deploy job and force recreate prometheus on deploy
This commit is contained in:
@@ -89,9 +89,11 @@ jobs:
|
||||
|
||||
deploy:
|
||||
name: Deploy production (on server)
|
||||
needs: ci
|
||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||
runs-on: docker-host
|
||||
steps:
|
||||
|
||||
- name: Install Node.js for Gitea Actions
|
||||
run: |
|
||||
if command -v apk >/dev/null 2>&1; then
|
||||
|
||||
@@ -81,8 +81,8 @@ for i in $(seq 1 24); do
|
||||
if [ "$ACTUAL" = "$GIT_COMMIT" ]; then
|
||||
echo "OK build-info commit=$ACTUAL"
|
||||
if docker ps --format '{{.Names}}' | grep -q "^memento-grafana$"; then
|
||||
echo "=== Recreating Grafana to load new provisioning and dashboards ==="
|
||||
docker compose -f monitoring/docker-compose.monitoring.yml up -d --force-recreate grafana
|
||||
echo "=== Recreating Grafana and Prometheus to load new configurations ==="
|
||||
docker compose -f monitoring/docker-compose.monitoring.yml up -d --force-recreate grafana prometheus
|
||||
fi
|
||||
docker compose ps
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user