Compare commits

..

1 Commits

Author SHA1 Message Date
ddb3ad1a72 fix: retain only latest production backup
Some checks failed
CI / test (pull_request) Failing after 4m46s
CI / deploy (pull_request) Has been skipped
2026-09-15 15:49:21 +03:00
3 changed files with 6 additions and 6 deletions

View File

@@ -51,12 +51,11 @@ jobs:
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
ssh -i "$RUNNER_TEMP/deploy_key" \ scp -i "$RUNNER_TEMP/deploy_key" \
-o BatchMode=yes \ -o BatchMode=yes \
-o UserKnownHostsFile="$RUNNER_TEMP/known_hosts" \ -o UserKnownHostsFile="$RUNNER_TEMP/known_hosts" \
"$PROD_USER@$PROD_HOST" \ "$RUNNER_TEMP/$RELEASE_NAME" \
"cat > \"\$HOME/$RELEASE_NAME\"" \ "$PROD_USER@$PROD_HOST:$RELEASE_NAME"
< "$RUNNER_TEMP/$RELEASE_NAME"
env: env:
PROD_HOST: ${{ secrets.PROD_HOST }} PROD_HOST: ${{ secrets.PROD_HOST }}
PROD_USER: ${{ secrets.PROD_USER }} PROD_USER: ${{ secrets.PROD_USER }}
@@ -81,6 +80,7 @@ jobs:
alpine:3.20 sh -c 'tar -xf /src/release.tar -C /dst' alpine:3.20 sh -c 'tar -xf /src/release.tar -C /dst'
docker compose up -d --build docker compose up -d --build
curl --fail --silent --show-error http://127.0.0.1:8000/api/health curl --fail --silent --show-error http://127.0.0.1:8000/api/health
find "$HOME/backups/miem_workers" -maxdepth 1 -type f -name 'miem_workers-*.sql' ! -path "$backup" -delete
docker compose ps docker compose ps
rm -f "$release" rm -f "$release"
REMOTE REMOTE

View File

@@ -2,7 +2,7 @@
## 0.8.7 ## 0.8.7
- Production CD передаёт release-архив через SSH вместо SFTP. - Production CD оставляет только последний PostgreSQL backup после успешного деплоя.
## 0.8.6 ## 0.8.6

View File

@@ -18,7 +18,7 @@ def test_health_returns_versions():
response = TestClient(app).get("/api/health") response = TestClient(app).get("/api/health")
assert response.status_code == 200 assert response.status_code == 200
assert response.json()["backend_version"] == "0.8.7" assert response.json()["backend_version"] == "0.8.6"
def test_api_employees_and_stats_require_admin_session(): def test_api_employees_and_stats_require_admin_session():