diff --git a/.github/workflows/deploy_test.yml b/.github/workflows/deploy_test.yml index 4acc432..4ca5a7d 100644 --- a/.github/workflows/deploy_test.yml +++ b/.github/workflows/deploy_test.yml @@ -22,6 +22,13 @@ jobs: export-variables: true keys-case: bypass + - name: Remove all previous containers (staging & production) + run: | + echo "Removing all previous containers (staging & production)" + docker compose -f docker-compose.stag.yml down || true + docker compose -f $COMPOSE_FILE down || true + docker system prune -af || true + - name: Set up test containers run: docker compose -f docker-compose.stag.yml up --build -d @@ -33,9 +40,6 @@ jobs: - name: Tear down test containers run: docker compose -f docker-compose.stag.yml down - - name: Tear down previous production containers (if any) - run: docker compose -f $COMPOSE_FILE down || true - - name: Build and run docker image run: docker compose -f $COMPOSE_FILE up --force-recreate --build -d