diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index aba5fb1b3..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: CI - -on: - push: - branches: [main, develop] - pull_request: - branches: [main, develop] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - NODE_VERSION: '18' - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Turborepo cache - uses: dtinth/setup-globals@v1 - with: - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - - - name: Build all packages - run: npm run build - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: build-artifacts - path: | - apps/**/dist - packages/**/dist - retention-days: 7 - - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run linter - run: npm run lint - - test: - name: Test - runs-on: ubuntu-latest - needs: [build] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run tests - run: npm run test - - - name: Upload coverage - uses: actions/upload-artifact@v4 - with: - name: coverage - path: '**/coverage/**' - retention-days: 7 - - typecheck: - name: Type Check - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Type check all packages - run: npx turbo run typecheck --filter=... diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index ed417c0ce..000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Deploy - -on: - push: - branches: [main] - release: - types: [published] - -env: - NODE_VERSION: '18' - -jobs: - deploy-staging: - name: Deploy to Staging - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - environment: staging - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - env: - NODE_ENV: production - - - name: Run migrations - run: npm run db:push - env: - DATABASE_URL: ${{ secrets.STAGING_DATABASE_URL }} - - - name: Deploy to staging - run: echo "Deploying to staging environment" - env: - AWS_REGION: ${{ secrets.AWS_REGION }} - STAGING_API_KEY: ${{ secrets.STAGING_API_KEY }} - - deploy-production: - name: Deploy to Production - runs-on: ubuntu-latest - if: github.event_name == 'release' - environment: production - needs: [deploy-staging] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - env: - NODE_ENV: production - - - name: Run migrations - run: npm run db:push - env: - DATABASE_URL: ${{ secrets.PRODUCTION_DATABASE_URL }} - - - name: Deploy to production - run: echo "Deploying to production environment" - env: - AWS_REGION: ${{ secrets.AWS_REGION }} - PRODUCTION_API_KEY: ${{ secrets.PRODUCTION_API_KEY }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index d09ff4420..000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Docker Build - -on: - push: - branches: [main, develop] - tags: ['v*'] - pull_request: - branches: [main, develop] - -env: - DOCKER_REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-docker: - name: Build Docker Image - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - env: - NODE_ENV: production - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Container Registry - uses: docker/login-action@v3 - with: - registry: ${{ env.DOCKER_REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=sha,prefix= - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max