ci: add Gitea Actions build and deploy pipeline
Build, Push and Deploy / build (push) Failing after 1s
Build, Push and Deploy / deploy (push) Skipped

This commit is contained in:
2026-08-30 15:05:37 +08:00
parent 8d4a3458a9
commit 52c2496331
3 changed files with 78 additions and 2 deletions
Executable
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail
APP_NAME="${1:-wordcloud}"
TARGET_ENV="${2:-production}"
IMAGE_TAG="${3:-latest}"
cd "$(dirname "$0")"
if docker compose version >/dev/null 2>&1; then
COMPOSE="docker compose"
else
COMPOSE="docker-compose"
fi
export COMPOSE_PROJECT_NAME="${APP_NAME}"
export IMAGE_TAG
echo "[deploy] project=${APP_NAME} env=${TARGET_ENV} image_tag=${IMAGE_TAG}"
$COMPOSE pull
$COMPOSE up -d --remove-orphans
$COMPOSE ps