Skip to content

Commit

Permalink
add deployment job for nestjs
Browse files Browse the repository at this point in the history
  • Loading branch information
sitek94 committed Nov 25, 2023
1 parent 84b562c commit f85f0d2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
id: app_name
with:
file: ./apps/nestjs/fly.toml
field: app

- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/[email protected]

- name: 🚀 Deploy
run: pnpm deploy:nestjs --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
4 changes: 2 additions & 2 deletions apps/nestjs/src/app.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ describe('AppController', () => {
})

describe('root', () => {
it('should return "Hello World!"', () => {
expect(appController.getHello()).toBe('Hello World!')
it('contains "Hello World"', () => {
expect(appController.getHello()).toContain('Hello World')
})
})
})
2 changes: 1 addition & 1 deletion apps/nestjs/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { Injectable } from '@nestjs/common'
@Injectable()
export class AppService {
getHello(): string {
return 'Hello World!'
return 'Hello World 1'
}
}

0 comments on commit f85f0d2

Please sign in to comment.