From 15966bcf6d17aee9ac8c1f210ce9bf9ea24dd9bc Mon Sep 17 00:00:00 2001 From: Remco <1+remco@noreply.gitlabi@epicnabbo.nl> Date: Wed, 15 Jul 2026 21:57:02 +0200 Subject: [PATCH] Update .gitea/workflows/deploy.yaml --- .gitea/workflows/deploy.yaml | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 7335ff93..d8dfb479 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -50,31 +50,7 @@ jobs: export PNPM_CONFIG_ONLY_BUILT_DEPENDENCIES="@parcel/watcher,@swc/core,sharp" pnpm install --frozen-lockfile - # 5. [SAFETY] Database Backup with Rotation (Keeps only last 5 backups) - echo "Creating database backup..." - BACKUP_DIR="/var/www/atom-nexst/backups" - mkdir -p "$BACKUP_DIR" - - TIMESTAMP=$(date +%Y%m%d_%H%M%S) - BACKUP_FILE="$BACKUP_DIR/db_backup_$TIMESTAMP.sql" - - # ----------------- DATABASE CONFIGURATION ----------------- - # Read credentials directly from your .env file or environment if available, - # or customize these variables to match your system. - DB_USER="root" - DB_NAME="epicnext" - # ---------------------------------------------------------- - - # Create a secure, compressed backup using mysqldump - # Note: If your MySQL requires a password, add '-pYourPassword' (no space after -p) - # or configure a secure /home/user/.my.cnf file to read credentials automatically. - mysqldump -u "$DB_USER" "$DB_NAME" > "$BACKUP_FILE" - - echo "Rotating older backups (keeping only the 5 newest files)..." - # Lists backup files newest first, skips the first 5, and deletes any remaining older files - ls -dt "$BACKUP_DIR"/db_backup_*.sql | tail -n +6 | xargs -r rm - - # Apply versioned CMS migrations and generate the Prisma client safely + # 5. Apply versioned CMS migrations and generate the Prisma client safely pnpm db:migrate pnpm prisma:generate