Update dependency @types/better-sqlite3 to v7.6.12 #255
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🚀 Deploy | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
actions: write | |
contents: read | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Install pnpm | |
run: corepack enable | |
- name: Set node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | |
with: | |
cache: pnpm | |
node-version: lts/* | |
- name: Setup | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Generate Prisma models | |
run: nr prisma:generate | |
- name: Build | |
run: nr build | |
- name: Lint | |
run: nr lint | |
typecheck: | |
name: Typecheck | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Install pnpm | |
run: corepack enable | |
- name: Set node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | |
with: | |
cache: pnpm | |
node-version: lts/* | |
- name: Setup | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Generate Prisma models | |
run: nr prisma:generate | |
- name: Build | |
run: nr build | |
- name: Typecheck | |
run: nr typecheck | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Install pnpm | |
run: corepack enable | |
- name: Set node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | |
with: | |
cache: pnpm | |
node-version: lts/* | |
- name: Setup | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Generate Prisma models | |
run: nr prisma:generate | |
- name: Build | |
run: nr build | |
- name: Copy test env vars | |
run: cp .env.example .env | |
- name: Test | |
run: nr test | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [lint, typecheck, test] | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Read app name | |
uses: SebRollen/toml-action@b1b3628f55fc3a28208d4203ada8b737e9687876 # v1.2.0 | |
id: app_name | |
with: | |
file: "fly.toml" | |
field: "app" | |
- name: Move Dockerfile | |
run: | | |
mv ./other/Dockerfile ./Dockerfile | |
mv ./other/.dockerignore ./.dockerignore | |
- name: Setup Fly | |
uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be # v1 | |
with: | |
version: 0.2.22 | |
- name: Deploy Staging | |
if: ${{ github.ref == 'refs/heads/dev' }} | |
run: | |
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | |
--app ${{ steps.app_name.outputs.value }}-staging | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
- name: Deploy Production | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | |
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | |
--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | |
--build-secret SENTRY_ORG=${{ secrets.SENTRY_ORG }} | |
--build-secret SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |