Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Feature updates, new components, and production improvements #25

Feature updates, new components, and production improvements

Feature updates, new components, and production improvements #25

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
ci:
name: Lint, Type Check, Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npm run type-check
- name: Unit tests
run: npm test
env:
IRON_SESSION_PASSWORD: test-password-that-is-at-least-32-characters-long
POLL_SECRET: test-poll-secret-16chars
NEXT_PUBLIC_APP_URL: https://test.swapify.app
- name: Integration tests
run: npm run test:integration
env:
IRON_SESSION_PASSWORD: test-password-that-is-at-least-32-characters-long
POLL_SECRET: test-poll-secret-16chars
NEXT_PUBLIC_APP_URL: https://test.swapify.app
- name: Build
run: npm run build
env:
NEXT_PUBLIC_APP_URL: https://swapify.312.dev
migrate:
name: Run Database Migrations
needs: ci
runs-on: ubuntu-latest
concurrency: deploy-production
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run migrations
run: npm run db:migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
deploy:
name: Deploy to Fly.io
needs: migrate
runs-on: ubuntu-latest
concurrency: deploy-production
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}