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:
|
deploy:
|
||||||
name: Deploy production (on server)
|
name: Deploy production (on server)
|
||||||
|
needs: ci
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
runs-on: docker-host
|
runs-on: docker-host
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Install Node.js for Gitea Actions
|
- name: Install Node.js for Gitea Actions
|
||||||
run: |
|
run: |
|
||||||
if command -v apk >/dev/null 2>&1; then
|
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
|
if [ "$ACTUAL" = "$GIT_COMMIT" ]; then
|
||||||
echo "OK build-info commit=$ACTUAL"
|
echo "OK build-info commit=$ACTUAL"
|
||||||
if docker ps --format '{{.Names}}' | grep -q "^memento-grafana$"; then
|
if docker ps --format '{{.Names}}' | grep -q "^memento-grafana$"; then
|
||||||
echo "=== Recreating Grafana to load new provisioning and dashboards ==="
|
echo "=== Recreating Grafana and Prometheus to load new configurations ==="
|
||||||
docker compose -f monitoring/docker-compose.monitoring.yml up -d --force-recreate grafana
|
docker compose -f monitoring/docker-compose.monitoring.yml up -d --force-recreate grafana prometheus
|
||||||
fi
|
fi
|
||||||
docker compose ps
|
docker compose ps
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user