From d89b7930c2f0c6b861a26e083bf7b6d512abb455 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 4 Mar 2026 09:59:47 +0100 Subject: [PATCH] chore(ci): merge ci checks into deploy and fix branch preview domain --- .gitea/workflows/ci.yml | 73 ------------------------------------- .gitea/workflows/deploy.yml | 29 ++++++++++++++- 2 files changed, 28 insertions(+), 74 deletions(-) delete mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml deleted file mode 100644 index d8b348da..00000000 --- a/.gitea/workflows/ci.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: CI - Lint, Typecheck & Test - -on: - pull_request: - -concurrency: - group: deploy-pipeline - cancel-in-progress: true - -jobs: - quality-assurance: - runs-on: docker - env: - PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup pnpm - uses: pnpm/action-setup@v3 - with: - version: 10 - run_install: false - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: ๐Ÿ” Registry Auth - run: | - echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc - echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc - - name: Install dependencies - run: | - pnpm store prune - pnpm install --no-frozen-lockfile - - - name: ๐ŸŒ Install Chromium (Native & ARM64) - run: | - rm -f /etc/apt/apt.conf.d/docker-clean - apt-get update - apt-get install -y gnupg wget ca-certificates - OS_ID=$(. /etc/os-release && echo $ID) - CODENAME=$(. /etc/os-release && echo $VERSION_CODENAME) - if [ "$OS_ID" = "debian" ]; then - apt-get install -y chromium - else - mkdir -p /etc/apt/keyrings - KEY_ID="82BB6851C64F6880" - wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x$KEY_ID" | gpg --dearmor > /etc/apt/keyrings/xtradeb.gpg - echo "deb [signed-by=/etc/apt/keyrings/xtradeb.gpg] http://ppa.launchpad.net/xtradeb/apps/ubuntu $CODENAME main" > /etc/apt/sources.list.d/xtradeb-ppa.list - printf "Package: *\nPin: release o=LP-PPA-xtradeb-apps\nPin-Priority: 1001\n" > /etc/apt/preferences.d/xtradeb - apt-get update - apt-get install -y --allow-downgrades chromium - fi - [ -f /usr/bin/chromium ] && ln -sf /usr/bin/chromium /usr/bin/google-chrome - [ -f /usr/bin/chromium ] && ln -sf /usr/bin/chromium /usr/bin/chromium-browser - - - name: ๐Ÿงช QA Checks - env: - TURBO_TELEMETRY_DISABLED: "1" - run: npx turbo run lint typecheck test --cache-dir=".turbo" - - - name: ๐Ÿ—๏ธ Build - run: pnpm build - - - name: โ™ฟ Accessibility Check - run: pnpm start-server-and-test start http://localhost:3000 "pnpm check:a11y http://localhost:3000" - - - name: โ™ฟ WCAG Sitemap Audit - run: pnpm start-server-and-test start http://localhost:3000 "pnpm run check:wcag http://localhost:3000" -# monitor trigger diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e6ac27ae..ab18f314 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -85,7 +85,7 @@ jobs: SLUG=$(echo "$REF" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//') IMAGE_TAG="branch-${SLUG}-${SHORT_SHA}" ENV_FILE=".env.branch-${SLUG}" - TRAEFIK_HOST="${SLUG}.branch.${DOMAIN}" + TRAEFIK_HOST="${SLUG}.branch.klz-cables.com" fi # Standardize Traefik Rule (escaped backticks for Traefik v3) @@ -186,12 +186,39 @@ jobs: - name: ๐Ÿ”’ Security Audit run: pnpm audit --audit-level high || echo "โš ๏ธ Audit found vulnerabilities (non-blocking)" + + - name: ๐ŸŒ Install Chromium (Native & ARM64) + run: | + rm -f /etc/apt/apt.conf.d/docker-clean + apt-get update + apt-get install -y gnupg wget ca-certificates + OS_ID=$(. /etc/os-release && echo $ID) + CODENAME=$(. /etc/os-release && echo $VERSION_CODENAME) + if [ "$OS_ID" = "debian" ]; then + apt-get install -y chromium + else + mkdir -p /etc/apt/keyrings + KEY_ID="82BB6851C64F6880" + wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x$KEY_ID" | gpg --dearmor > /etc/apt/keyrings/xtradeb.gpg + echo "deb [signed-by=/etc/apt/keyrings/xtradeb.gpg] http://ppa.launchpad.net/xtradeb/apps/ubuntu $CODENAME main" > /etc/apt/sources.list.d/xtradeb-ppa.list + printf "Package: *\nPin: release o=LP-PPA-xtradeb-apps\nPin-Priority: 1001\n" > /etc/apt/preferences.d/xtradeb + apt-get update + apt-get install -y --allow-downgrades chromium + fi + [ -f /usr/bin/chromium ] && ln -sf /usr/bin/chromium /usr/bin/google-chrome + [ -f /usr/bin/chromium ] && ln -sf /usr/bin/chromium /usr/bin/chromium-browser + - name: ๐Ÿงช QA Checks if: github.event.inputs.skip_checks != 'true' env: TURBO_TELEMETRY_DISABLED: "1" run: npx turbo run lint typecheck test --cache-dir=".turbo" + - name: โ™ฟ Accessibility Check + run: pnpm start-server-and-test start http://localhost:3000 "pnpm check:a11y http://localhost:3000" + + - name: โ™ฟ WCAG Sitemap Audit + run: pnpm start-server-and-test start http://localhost:3000 "pnpm run check:wcag http://localhost:3000" # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ # JOB 3: Build & Push # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€