Skip to content

Commit

Permalink
organize workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsam committed Apr 27, 2024
1 parent f6e5a35 commit ba84f7f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
jobs:
lint:
name: 🧶 ESLint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4
Expand All @@ -33,11 +33,11 @@ jobs:
run_install: true

- name: 🧶 Lint
run: pnpm run lint
run: pnpm lint

typecheck:
name: 🔬 TypeScript
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4
Expand All @@ -54,7 +54,7 @@ jobs:
run_install: true

- name: 🔬 Type check
run: pnpm run typecheck
run: pnpm typecheck

vitest:
name: âš¡ Vitest
Expand All @@ -79,7 +79,7 @@ jobs:

migration:
name: 🧬 Migration
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [lint, typecheck, vitest]
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev'}}

Expand All @@ -100,21 +100,21 @@ jobs:

- name: 🧬 Staging Migration
if: ${{ github.ref_name == 'dev'}}
run: pnpm run db:migrate
run: pnpm db:migrate
env:
TURSO_DB_URL: ${{ secrets.STAGING_TURSO_DB_URL }}
TURSO_DB_AUTH_TOKEN: ${{ secrets.STAGING_TURSO_DB_AUTH_TOKEN }}

- name: 🧬 Production Migration
if: ${{ github.ref_name == 'main'}}
run: pnpm run db:migrate
run: pnpm db:migrate
env:
TURSO_DB_URL: ${{ secrets.TURSO_DB_URL }}
TURSO_DB_AUTH_TOKEN: ${{ secrets.TURSO_DB_AUTH_TOKEN }}

deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [lint, typecheck, vitest, migration]
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev'}}

Expand Down

0 comments on commit ba84f7f

Please sign in to comment.