ci: drop deploy.yml + sync-dev-to-gitea.yml — pipeline now Gitea-only
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled

Gitea (git.semih.ai) is the canonical remote. Coolify pulls from Gitea
and triggers builds via Gitea webhooks. Deployment notifications come
from Coolify's built-in Telegram integration (team-level, configured
2026-05-14).

What used to be done by GH Actions:
- deploy.yml (push main → SSH → PM2 → bare-metal sase.tr)
- sync-dev-to-gitea.yml (mirror github/dev → gitea/dev)

What replaces it:
- Push to gitea/main → Coolify webhook → sparkling-snake (production env, prod-iskelet ready)
- Push to gitea/dev  → Coolify webhook → good-gerenuk (staging env, dev.sase.tr)
- Both deploys notified via Coolify → Telegram (chat 7840804807)

qa-gate.yml retained for now (PR test gating); will revisit when Gitea
Actions / Drone are wired or removed if obsolete.
This commit is contained in:
Fusion
2026-05-14 07:47:52 +00:00
parent 3267984395
commit 12bc1228b9
2 changed files with 0 additions and 192 deletions

View File

@@ -1,116 +0,0 @@
name: Deploy
on:
push:
branches: [main]
concurrency:
group: deploy-production
cancel-in-progress: false
jobs:
deploy:
name: Deploy to Production
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
set -euo pipefail
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
cd /home/${{ secrets.SSH_USER }}/ss
echo "$(date '+%Y-%m-%d %H:%M:%S') - Starting deployment..."
echo "$(date '+%Y-%m-%d %H:%M:%S') - Pulling latest changes..."
git fetch origin main
# Hard reset to remote to drop any stale build artifacts (e.g. tsbuildinfo)
# that would otherwise block 'git pull'. The deploy server is treated as
# a deployment target, not a development checkout.
git reset --hard origin/main
echo "$(date '+%Y-%m-%d %H:%M:%S') - Installing dependencies..."
pnpm install --frozen-lockfile
echo "$(date '+%Y-%m-%d %H:%M:%S') - Building..."
pnpm build
echo "$(date '+%Y-%m-%d %H:%M:%S') - Installing Playwright Chromium (if missing)..."
cd apps/web && npx playwright install chromium --with-deps 2>/dev/null || true
echo "$(date '+%Y-%m-%d %H:%M:%S') - Pre-rendering public pages..."
pnpm prerender || echo "WARNING: Pre-render failed (non-fatal)"
cd /home/${{ secrets.SSH_USER }}/ss
echo "$(date '+%Y-%m-%d %H:%M:%S') - Running database migrations..."
cd apps/api && pnpm db:migrate && cd ../..
echo "$(date '+%Y-%m-%d %H:%M:%S') - Reloading PM2 processes..."
pm2 reload ecosystem.config.js
echo "$(date '+%Y-%m-%d %H:%M:%S') - Deployment complete!"
# Fires after a successful PM2 reload. Calls the Fusion Routine API
# (POST /api/routines/<id>/trigger), which runs the changelog auto-publisher
# script: it reads recent github/main commits, summarizes them via DeepSeek,
# and POSTs an entry to /api/changelog/internal.
# FUSION_CHANGELOG_AUTOMATION_ID is the routine UUID (kept as-is for
# backward compatibility; semantically it's a routine ID since the legacy
# /automations endpoint was retired in favor of /routines).
- name: Trigger Fusion changelog automation
if: success()
continue-on-error: true
run: |
if [ -z "${{ secrets.FUSION_CHANGELOG_AUTOMATION_ID }}" ] || [ -z "${{ secrets.FUSION_DAEMON_TOKEN }}" ]; then
echo "Fusion changelog secrets not configured — skipping automation trigger"
exit 0
fi
curl -sf -X POST --max-time 120 \
-H "Authorization: Bearer ${{ secrets.FUSION_DAEMON_TOKEN }}" \
"https://fusion.semih.ai/api/routines/${{ secrets.FUSION_CHANGELOG_AUTOMATION_ID }}/trigger?projectId=proj_155fecc31ef14928&scope=project" \
|| echo "Fusion trigger failed (non-fatal, continuing)"
- name: Notify Telegram
if: always()
continue-on-error: true
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
JOB_STATUS: ${{ job.status }}
COMMIT_SHA: ${{ github.sha }}
COMMIT_MSG: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR: ${{ github.event.head_commit.author.name }}
REF_NAME: ${{ github.ref_name }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
if [ -z "${TELEGRAM_BOT_TOKEN:-}" ] || [ -z "${TELEGRAM_CHAT_ID:-}" ]; then
echo "Telegram secrets not configured — skipping notification"
exit 0
fi
SHORT_SHA="${COMMIT_SHA:0:7}"
FIRST_LINE=$(printf "%s" "$COMMIT_MSG" | head -n1)
if [ "$JOB_STATUS" = "success" ]; then
ICON="✅"; TITLE="sase.tr — Prod deploy başarılı"
else
ICON="❌"; TITLE="sase.tr — Prod deploy BAŞARISIZ ($JOB_STATUS)"
fi
escape() { printf "%s" "$1" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g'; }
BODY="$ICON <b>$(escape "$TITLE")</b>%0A%0A<b>Branch:</b> <code>$(escape "$REF_NAME")</code>%0A<b>Commit:</b> <code>$SHORT_SHA</code> $(escape "$FIRST_LINE")%0A<b>Author:</b> $(escape "$COMMIT_AUTHOR")%0A%0A<a href=\"$RUN_URL\">Workflow run</a>"
curl -sS --max-time 15 \
-X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-d "chat_id=${TELEGRAM_CHAT_ID}" \
-d "parse_mode=HTML" \
-d "disable_web_page_preview=true" \
--data-urlencode "text=$(printf "%s" "$BODY" | sed 's/%0A/\n/g')" \
| head -c 500
echo

View File

@@ -1,76 +0,0 @@
name: Sync dev → Gitea
# When dev is updated on GitHub (Fusion auto-push or manual), mirror it
# to Gitea so Coolify's Gitea webhook redeploys dev.sase.tr.
on:
push:
branches: [dev]
# Allow manual re-sync from the Actions tab
workflow_dispatch:
concurrency:
group: sync-dev-gitea
cancel-in-progress: false
jobs:
sync:
name: Mirror dev to Gitea
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout dev (full history)
uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0
- name: Push to Gitea
env:
GITEA_PUSH_URL: ${{ secrets.GITEA_PUSH_URL }}
run: |
set -euo pipefail
if [ -z "$GITEA_PUSH_URL" ]; then
echo "::error::GITEA_PUSH_URL secret not set"
exit 1
fi
# Fast-forward push; if Gitea has diverged, surface the failure
# rather than silently force-overwriting.
git push "$GITEA_PUSH_URL" HEAD:refs/heads/dev
echo "✓ dev synced to Gitea ($(git rev-parse --short HEAD))"
- name: Notify Telegram
if: always()
continue-on-error: true
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
JOB_STATUS: ${{ job.status }}
COMMIT_SHA: ${{ github.sha }}
COMMIT_MSG: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR: ${{ github.event.head_commit.author.name }}
REF_NAME: ${{ github.ref_name }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
if [ -z "${TELEGRAM_BOT_TOKEN:-}" ] || [ -z "${TELEGRAM_CHAT_ID:-}" ]; then
echo "Telegram secrets not configured — skipping notification"
exit 0
fi
SHORT_SHA="${COMMIT_SHA:0:7}"
FIRST_LINE=$(printf "%s" "$COMMIT_MSG" | head -n1)
if [ -z "$FIRST_LINE" ]; then FIRST_LINE="(manual dispatch)"; fi
if [ "$JOB_STATUS" = "success" ]; then
ICON="✅"; TITLE="dev.sase.tr — Gitea sync başarılı"
else
ICON="❌"; TITLE="dev.sase.tr — Gitea sync BAŞARISIZ ($JOB_STATUS)"
fi
escape() { printf "%s" "$1" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g'; }
BODY="$ICON <b>$(escape "$TITLE")</b>%0A%0A<b>Branch:</b> <code>$(escape "$REF_NAME")</code>%0A<b>Commit:</b> <code>$SHORT_SHA</code> $(escape "$FIRST_LINE")%0A<b>Author:</b> $(escape "$COMMIT_AUTHOR")%0A%0A<a href=\"$RUN_URL\">Workflow run</a>"
curl -sS --max-time 15 \
-X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-d "chat_id=${TELEGRAM_CHAT_ID}" \
-d "parse_mode=HTML" \
-d "disable_web_page_preview=true" \
--data-urlencode "text=$(printf "%s" "$BODY" | sed 's/%0A/\n/g')" \
| head -c 500
echo