Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ AB_FEATURE_TESTING_PORTALS=
SENTRY_ORG=
SENTRY_PROJECT=
NEXT_PUBLIC_SENTRY_DSN=
SENTRY_AUTHTOKEN=
SENTRY_AUTH_TOKEN=
112 changes: 112 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Deploy

on:
push:
branches: [master]

# Newer push to master supersedes an in-flight deploy run.
concurrency:
group: deploy-production
cancel-in-progress: true

permissions:
contents: read

# Actions are pinned to full commit SHAs, not @v4 tags: tags are mutable,
# and the deploy job runs these before handing production secrets to the
# deploy step. A moved tag must not run here. Bump SHA + version comment together.
jobs:
typecheck:
name: Typecheck tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22.14.0
cache: yarn
cache-dependency-path: './yarn.lock'

- name: Install dependencies
run: yarn install --immutable

- name: Typecheck test files
run: yarn typecheck:test

test:
name: Run tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22.14.0
cache: yarn
cache-dependency-path: './yarn.lock'

- name: Install dependencies
run: yarn install --immutable

- name: Run tests
run: yarn test

lint:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22.14.0
cache: yarn
cache-dependency-path: './yarn.lock'

- name: Install dependencies
run: yarn install --immutable

- name: Run linters
run: yarn lint:check && yarn prettier:check

deploy:
name: Deploy to Trigger.dev
needs: [typecheck, test, lint]
runs-on: ubuntu-latest
environment: Production
timeout-minutes: 20

steps:
- name: Check out Git repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22.14.0
cache: yarn
cache-dependency-path: './yarn.lock'

- name: Install dependencies
run: yarn install --immutable

- name: Deploy to Trigger.dev production
run: yarn trigger:deploy
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
TRIGGER_PROJECT_ID: ${{ secrets.TRIGGER_PROJECT_ID }}
VERCEL_ENV: production
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ name: Lint

on: push

# Actions pinned to full commit SHAs: tags are mutable and can be moved
# after a compromise. Bump SHA + version comment together.
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22.14.0
cache: yarn
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ name: CI

on: pull_request

# Actions pinned to full commit SHAs: tags are mutable and can be moved
# after a compromise. Bump SHA + version comment together.
jobs:
typecheck:
name: Typecheck tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22.14.0
cache: yarn
Expand All @@ -30,10 +32,10 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22.14.0
cache: yarn
Expand Down
Loading