From 760a6d6db3cf08af0e07a9cd2abaa729de56d1ec Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 2 Mar 2026 10:08:23 +0100 Subject: [PATCH] fix(ci): fix OG image routes and proper post-deploy environment setup --- .gitea/workflows/deploy.yml | 30 ++++++++++++++++++++++++++--- apps/web/scripts/check-og-images.ts | 4 +++- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 5eb06ca..cdcbe8a 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -414,6 +414,27 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Setup pnpm + uses: pnpm/action-setup@v3 + with: + version: 10 + - name: Provide sibling monorepo + run: | + git clone https://git.infra.mintel.me/mmintel/at-mintel.git _at-mintel + sed -i 's|../../../at-mintel|../../_at-mintel|g' apps/web/package.json + sed -i 's|../../../at-mintel|../../_at-mintel|g' apps/web/tsconfig.json + sed -i 's|../at-mintel|./_at-mintel|g' package.json + - name: šŸ” Registry Auth + run: | + echo "@mintel:registry=https://${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}" > .npmrc + echo "//${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc + - name: Install dependencies + run: | + pnpm install --no-frozen-lockfile - name: šŸ„ CMS Deep Health Check env: DEPLOY_URL: ${{ needs.prepare.outputs.next_public_url }} @@ -436,13 +457,16 @@ jobs: - name: šŸš€ OG Image Check env: TEST_URL: ${{ needs.prepare.outputs.next_public_url }} - run: npx tsx apps/web/scripts/check-og-images.ts + run: pnpm --filter @mintel/web check:og - name: šŸ“ E2E Smoke Test - continue-on-error: true env: NEXT_PUBLIC_BASE_URL: ${{ needs.prepare.outputs.next_public_url }} GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }} - run: npx tsx apps/web/scripts/check-forms.ts || echo 'āš ļø E2E skipped (Puppeteer may not be available)' + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "false" + run: | + # Install Puppeteer system dependencies + sudo apt-get update && sudo apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libcomposite1 libxdamage1 libxrandr2 libgbm1 libasound2 + pnpm --filter @mintel/web check:forms # ────────────────────────────────────────────────────────────────────────────── # JOB 6: Notifications diff --git a/apps/web/scripts/check-og-images.ts b/apps/web/scripts/check-og-images.ts index 886b961..9df88d7 100644 --- a/apps/web/scripts/check-og-images.ts +++ b/apps/web/scripts/check-og-images.ts @@ -3,7 +3,9 @@ const BASE_URL = process.env.TEST_URL || "http://localhost:3000"; console.log(`\nšŸš€ Starting OG Image Verification for ${BASE_URL}\n`); const routes = [ - "/api/og/meme", // Adjusted for mintel.me endpoints if they exist + "/opengraph-image", + "/about/opengraph-image", + "/contact/opengraph-image", ]; async function verifyImage(path: string): Promise {