Skip to content

update sentry and add profiling #173

update sentry and add profiling

update sentry and add profiling #173

Workflow file for this run

name: πŸš€ Deploy
on:
push:
branches:
- main
- dev
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
lint:
name: 🧢 ESLint
runs-on: ubuntu-22.04
steps:
- name: πŸ‘€ Checkout repo
uses: actions/checkout@v4
- name: 🟒 Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: pnpm/action-setup@v3
with:
version: 9
run_install: true
- name: 🧢 Lint
run: pnpm lint
typecheck:
name: πŸ”¬ TypeScript
runs-on: ubuntu-22.04
steps:
- name: πŸ‘€ Checkout repo
uses: actions/checkout@v4
- name: 🟒 Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: pnpm/action-setup@v3
with:
version: 9
run_install: true
- name: πŸ”¬ Type check
run: pnpm typecheck
vitest:
name: ⚑ Vitest
runs-on: ubuntu-22.04
steps:
- name: πŸ‘€ Checkout repo
uses: actions/checkout@v4
- name: 🟒 Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: pnpm/action-setup@v3
with:
version: 9
run_install: true
- name: ⚑ Run vitest
run: pnpm coverage
migration:
name: 🧬 Migration
runs-on: ubuntu-22.04
needs: [lint, typecheck, vitest]
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev'}}
steps:
- name: πŸ‘€ Checkout repo
uses: actions/checkout@v4
- name: 🟒 Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: pnpm/action-setup@v3
with:
version: 9
run_install: true
- name: 🧬 Staging Migration
if: ${{ github.ref_name == 'dev'}}
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 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-22.04
needs: [lint, typecheck, vitest, migration]
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev'}}
steps:
- name: πŸ‘€ Checkout repo
uses: actions/checkout@v4
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@1.5
- name: πŸš€ Deploy Staging
if: ${{ github.ref_name == 'dev'}}
run: flyctl deploy --remote-only --config fly.staging.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: πŸš€ Deploy Production
if: ${{ github.ref_name == 'main'}}
run: >
flyctl deploy
--remote-only
--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
--build-arg SENTRY_ORG="samuel-jensen"
--build-arg SENTRY_PROJECT="nichtsam-com"
--build-arg COMMIT_SHA=${{ github.sha }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}