Update .gitea/workflows/deploy.yaml
Local Build and Deploy / deploy (push) Successful in 55s

This commit is contained in:
remco committed 2026-07-15 21:57:02 +02:00
1 parent 64db83c5d3
commit 15966bcf6d
1 file changed
+1 -25
+1 -25
View File
@@ -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