name:CIon:pull_request:workflow_dispatch:jobs:test:runs-on:ubuntu-lateststeps:- uses:actions/checkout@v4- uses:supabase/setup-cli@v1with:version:latest- name:Start Supabase local development setuprun:supabase db start- name:Verify generated types are checked inrun:| supabase gen types typescript --local > types.gen.ts
if ! git diff --ignore-space-at-eol --exit-code --quiet types.gen.ts; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
production.yaml
name:Deploy Migrations to Productionon:push:branches:- mainworkflow_dispatch:jobs:deploy:runs-on:ubuntu-latestenv:SUPABASE_ACCESS_TOKEN:${{ secrets.SUPABASE_ACCESS_TOKEN }}SUPABASE_DB_PASSWORD:${{ secrets.PRODUCTION_DB_PASSWORD }}SUPABASE_PROJECT_ID:${{ secrets.PRODUCTION_PROJECT_ID }}steps:- uses:actions/checkout@v4- uses:supabase/setup-cli@v1with:version:latest- run:supabase link --project-ref $SUPABASE_PROJECT_ID- run:supabase db push
# CI.yaml
```yaml
name: CI
on:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Start Supabase local development setup
run: supabase db start
- name: Verify generated types are checked in
run: |
supabase gen types typescript --local > types.gen.ts
if ! git diff --ignore-space-at-eol --exit-code --quiet types.gen.ts; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
```
# production.yaml
```yaml
name: Deploy Migrations to Production
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }}
SUPABASE_PROJECT_ID: ${{ secrets.PRODUCTION_PROJECT_ID }}
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
- run: supabase link --project-ref $SUPABASE_PROJECT_ID
- run: supabase db push
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
CI.yaml
production.yaml
Implementado