diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 53771d8f..1c7dec67 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -141,6 +141,8 @@ jobs: docker compose up --no-build --pull never --wait db - name: Prepare and build API container + env: + SKIP_CLEANUP: 'yes' run: | api/prepare-api.sh diff --git a/api/prepare-api.sh b/api/prepare-api.sh index 2d0cc494..674be2e3 100755 --- a/api/prepare-api.sh +++ b/api/prepare-api.sh @@ -53,5 +53,5 @@ echo 'Building API container' docker compose build api echo 'Cleaning up' -rm -rf api/postgres-data -rm api/api.sql +[ -n "$SKIP_CLEANUP" ] || rm -rf api/postgres-data +[ -n "$SKIP_CLEANUP" ] || rm -f api/api.sql