GitHub Actions remains the sole deploy path after Supabase migrations; vercel.json ignoreCommand skips integration-triggered builds.
64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: deploy-production-main
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Set up Supabase CLI
|
|
uses: supabase/setup-cli@v1
|
|
with:
|
|
version: 2.101.0
|
|
|
|
- name: Link Supabase project
|
|
env:
|
|
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
|
SUPABASE_PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_REF }}
|
|
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
|
|
run: supabase link --project-ref "$SUPABASE_PROJECT_REF" --password "$SUPABASE_DB_PASSWORD"
|
|
|
|
- name: Apply pending migrations and seed baseline data
|
|
env:
|
|
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
|
run: supabase db push --linked --include-seed
|
|
|
|
# Sole production deploy path. vercel.json ignoreCommand skips Git-triggered
|
|
# Vercel builds so pushes do not produce a duplicate deployment.
|
|
- name: Set up Vercel CLI
|
|
run: npm install --global vercel@54.4.1
|
|
|
|
- name: Deploy to Vercel production
|
|
env:
|
|
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
run: vercel deploy --prod --yes --token "$VERCEL_TOKEN"
|