Files
omo-bot/.gitea/workflows/ci-cd.yml
T
zwitschi cf564f2886
CI-CD / Bot Lint Test Build (push) Successful in 1m24s
CI-CD / Dashboard Lint Build (push) Successful in 14s
CI-CD / Deploy to Coolify (push) Failing after 3s
feat: Update CI/CD workflow to trigger separate backend and dashboard deployments; enhance deployment documentation with Nginx proxy details and OAuth callback URLs
2026-05-17 19:08:26 +02:00

110 lines
2.6 KiB
YAML

name: CI-CD
on:
push:
branches:
- "**"
pull_request:
jobs:
bot-checks:
name: Bot Lint Test Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Test
run: npm run test
dashboard-checks:
name: Dashboard Lint Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: admin-dashboard
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: admin-dashboard/package-lock.json
- name: Install dashboard dependencies
run: npm ci
- name: Lint dashboard
run: npm run lint
- name: Build dashboard
run: npm run build
deploy-coolify:
name: Deploy to Coolify
runs-on: ubuntu-latest
needs:
- bot-checks
- dashboard-checks
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- name: Trigger backend deploy
env:
HOOK_URL: ${{ secrets.COOLIFY_DEPLOY_HOOK_URL_BOT }}
HOOK_TOKEN: ${{ secrets.COOLIFY_DEPLOY_TOKEN_BOT }}
run: |
if [ -z "$HOOK_URL" ]; then
echo "Missing COOLIFY_DEPLOY_HOOK_URL_BOT"
exit 1
fi
if [ -n "$HOOK_TOKEN" ]; then
curl --fail --show-error --silent \
-X POST \
-H "Authorization: Bearer $HOOK_TOKEN" \
"$HOOK_URL"
else
curl --fail --show-error --silent -X POST "$HOOK_URL"
fi
echo "Backend deploy triggered"
- name: Trigger dashboard deploy
env:
HOOK_URL: ${{ secrets.COOLIFY_DEPLOY_HOOK_URL_DASHBOARD }}
HOOK_TOKEN: ${{ secrets.COOLIFY_DEPLOY_TOKEN_DASHBOARD }}
run: |
if [ -z "$HOOK_URL" ]; then
echo "Missing COOLIFY_DEPLOY_HOOK_URL_DASHBOARD"
exit 1
fi
if [ -n "$HOOK_TOKEN" ]; then
curl --fail --show-error --silent \
-X POST \
-H "Authorization: Bearer $HOOK_TOKEN" \
"$HOOK_URL"
else
curl --fail --show-error --silent -X POST "$HOOK_URL"
fi
echo "Dashboard deploy triggered"