Skip to content

fix: only display banner if no session and minor layout updates (#283) #197

fix: only display banner if no session and minor layout updates (#283)

fix: only display banner if no session and minor layout updates (#283) #197

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# Code quality checks
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
# Generate Prisma Client before running tests
- name: Generate Prisma Client
run: npx prisma generate
# Run Prisma migrations on test database
- name: Run Prisma Migrations
run: npx prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }}
DIRECT_URL: ${{ secrets.TEST_DIRECT_URL }}
- name: Build the application
run: npm run build
# Add tests to run
#- name: Run tests
# run: npm test
# env:
# DATABASE_URL:
# DIRECT_URL:
# Database migrations
migrate:
needs: verify # Only run migrations if tests pass
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Generate Prisma Client
run: npx prisma generate
- name: Apply database migrations
run: npx prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }}
DIRECT_URL: ${{ secrets.PROD_DIRECT_URL }}
- name: Trigger Coolify deployment
run: |
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' \
--header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'