diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index a364266..1b31d1e 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -32,10 +32,25 @@ jobs: mkdir -p meshcentral-backup mkdir -p meshcentral-config + - name: Pull latest MeshCentral image + run: docker pull ghcr.io/ylianst/meshcentral:latest + + - name: Pull fresh images used in compose + run: docker compose pull + + - name: Clean up existing stack + run: docker compose --project-name $APP_NAME down + + - name: Remove old config to force regeneration + run: | + rm -f meshcentral-data/config.json + rm -f meshcentral-data/*.db + rm -f meshcentral-data/*.crt + rm -f meshcentral-data/*.key + rm -f meshcentral-data/serverstate.txt + - name: Generate MeshCentral config.json run: | - # Forzar regeneración del config.json - rm -f meshcentral-data/config.json cat > meshcentral-data/config.json <<'EOF' { "settings": { @@ -92,15 +107,6 @@ jobs: chmod -R 755 meshcentral-backup chmod -R 755 meshcentral-config - - name: Pull latest MeshCentral image - run: docker pull ghcr.io/ylianst/meshcentral:latest - - - name: Pull fresh images used in compose - run: docker compose pull - - - name: Clean up existing stack - run: docker compose --project-name $APP_NAME down - - name: Start MeshCentral stack run: docker compose --project-name $APP_NAME up -d --remove-orphans --wait