diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ce8e83e..0ac9339 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -36,3 +36,29 @@ jobs: - name: Build run: pnpm build + + deploy-nestjs: + name: Deploy NestJS App + runs-on: ubuntu-latest + # needs: [typecheck, lint, test, build] + needs: [validate] + if: ${{ github.ref == 'refs/heads/main' }} + + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v4 + + - name: 👀 Read app name + uses: SebRollen/toml-action@v1.0.0 + id: app_name + with: + file: ./apps/nestjs/fly.toml + field: app + + - name: 🎈 Setup Fly + uses: superfly/flyctl-actions/setup-flyctl@v1.4 + + - name: 🚀 Deploy Production + run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/apps/nestjs/src/app.service.ts b/apps/nestjs/src/app.service.ts index bc13055..68c94f2 100644 --- a/apps/nestjs/src/app.service.ts +++ b/apps/nestjs/src/app.service.ts @@ -3,6 +3,6 @@ import { Injectable } from '@nestjs/common' @Injectable() export class AppService { getHello(): string { - return 'Hello World!' + return 'Hello World 1' } }