Skip to content

feat: track widget dashboard button clicks (AI Credits, GoodReserve, … #26

feat: track widget dashboard button clicks (AI Credits, GoodReserve, …

feat: track widget dashboard button clicks (AI Credits, GoodReserve, … #26

name: Main branch checks and staging deployment
on:
push:
branches:
- main
jobs:
build:
name: Build workspace
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Enable Corepack
run: corepack enable
- name: Run install
run: yarn install --immutable
- name: Run Biome Check
uses: borales/actions-yarn@v5
with:
cmd: biome:verify:all
- name: Pull Vercel Preview environment
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: npx --yes vercel@latest pull --yes --environment=preview --token="$VERCEL_TOKEN"
- name: Build Vercel prebuilt Preview artifact
env:
NODE_OPTIONS: --max_old_space_size=8192
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: npx --yes vercel@latest build --target=preview --token="$VERCEL_TOKEN"
- name: Run Tests
uses: borales/actions-yarn@v5
with:
cmd: test
- name: Install Playwright Chromium
run: yarn playwright install --with-deps chromium
- name: Run Playwright screenshots
uses: borales/actions-yarn@v5
with:
cmd: test:e2e
- name: Deploy Vercel prebuilt Preview
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: npx --yes vercel@latest deploy --prebuilt --target=preview --token="$VERCEL_TOKEN"
- name: Upload Playwright screenshots and failure artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-artifacts
path: |
tests-playwright/screenshots/
tests-playwright/artifacts/
if-no-files-found: warn