[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M796DQB6RC66QC09YPNGX72T":3,"skill-same:01M796DQB6RC66QC09YPNGX72T":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M796DQB6RC66QC09YPNGX72T","supabase-ci-integration",null,"Configure Supabase CI\u002FCD pipelines with GitHub Actions: link projects,\npush migrations, deploy Edge Functions, generate types, and run tests\nagainst local Supabase instances.\nUse when setting up CI pipelines for Supabase, automating database\nmigrations, deploying Edge Functions in CI, or running integration tests.\nTrigger with phrases like \"supabase CI\", \"supabase GitHub Actions\",\n\"supabase deploy pipeline\", \"CI supabase migrations\", \"supabase preview branches\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--supabase-pack--supabase-ci-integration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: supabase-ci-integration\ndescription: |\n  Configure Supabase CI\u002FCD pipelines with GitHub Actions: link projects,\n  push migrations, deploy Edge Functions, generate types, and run tests\n  against local Supabase instances.\n  Use when setting up CI pipelines for Supabase, automating database\n  migrations, deploying Edge Functions in CI, or running integration tests.\n  Trigger with phrases like \"supabase CI\", \"supabase GitHub Actions\",\n  \"supabase deploy pipeline\", \"CI supabase migrations\", \"supabase preview branches\".\nallowed-tools: Read, Write, Edit, Bash(npx:*), Bash(gh:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [saas, supabase, ci-cd, github-actions, devops]\n---\n\n# Supabase CI Integration\n\n## Overview\n\nBuild GitHub Actions workflows that automate the full Supabase lifecycle: link projects in CI, push migrations on merge, deploy Edge Functions, generate TypeScript types, run tests against a local Supabase instance, and create preview branches for pull requests. Every database change gets validated before it reaches production.\n\n## Prerequisites\n\n- GitHub repository with Actions enabled\n- Supabase project created at [supabase.com\u002Fdashboard](https:\u002F\u002Fsupabase.com\u002Fdashboard)\n- Supabase CLI initialized locally (`npx supabase init`)\n- Node.js 18+ in your project\n- `@supabase\u002Fsupabase-js` installed:\n\n```bash\nnpm install @supabase\u002Fsupabase-js\n```\n\n## Instructions\n\n### Step 1: Configure GitHub Secrets and Link in CI\n\nStore credentials as GitHub repository secrets. The CI pipeline uses these to authenticate with your Supabase project without exposing tokens in code.\n\n```bash\n# Set secrets via GitHub CLI\ngh secret set SUPABASE_ACCESS_TOKEN --body \"\u003Cyour-access-token>\"\ngh secret set SUPABASE_DB_PASSWORD --body \"\u003Cyour-database-password>\"\ngh secret set SUPABASE_PROJECT_REF --body \"\u003Cyour-project-ref>\"\n```\n\nGenerate your access token at [supabase.com\u002Fdashboard\u002Faccount\u002Ftokens](https:\u002F\u002Fsupabase.com\u002Fdashboard\u002Faccount\u002Ftokens). Find your project ref in Project Settings > General.\n\nLink the project in any CI job that needs remote access:\n\n```yaml\n- name: Install Supabase CLI\n  uses: supabase\u002Fsetup-cli@v1\n  with:\n    version: latest\n\n- name: Link Supabase project\n  run: npx supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_REF }}\n  env:\n    SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n```\n\n### Step 2: CI Workflow — Test, Validate Migrations, and Generate Types\n\nThis workflow starts a local Supabase instance, applies migrations, generates types, and runs your test suite on every pull request. It catches schema drift, broken migrations, and test failures before merge.\n\n```yaml\n# .github\u002Fworkflows\u002Fsupabase-ci.yml\nname: Supabase CI\n\non:\n  pull_request:\n    branches: [main]\n  push:\n    branches: [main]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Install Supabase CLI\n        uses: supabase\u002Fsetup-cli@v1\n        with:\n          version: latest\n\n      # Start local Supabase (disable unused services for speed)\n      - name: Start local Supabase\n        run: npx supabase start -x realtime,storage-api,imgproxy,inbucket\n\n      # Apply all migrations and seed data from scratch\n      - name: Validate migrations\n        run: npx supabase db reset\n\n      # Generate types and detect drift from committed version\n      - name: Generate and verify TypeScript types\n        run: |\n          npx supabase gen types typescript --local > src\u002Ftypes\u002Fdatabase.types.ts\n          git diff --exit-code src\u002Ftypes\u002Fdatabase.types.ts || {\n            echo \"::error::TypeScript types are out of sync with database schema\"\n            echo \"Run: npx supabase gen types typescript --local > src\u002Ftypes\u002Fdatabase.types.ts\"\n            exit 1\n          }\n\n      # Run pgTAP database tests\n      - name: Run database tests\n        run: npx supabase test db\n\n      # Run application tests against local Supabase\n      - name: Run application tests\n        run: npm test\n        env:\n          SUPABASE_URL: http:\u002F\u002F127.0.0.1:54321\n          SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0\n          SUPABASE_SERVICE_ROLE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU\n\n      - name: Type check\n        run: npx tsc --noEmit\n\n      - name: Stop Supabase\n        if: always()\n        run: npx supabase stop\n```\n\nThe `SUPABASE_ANON_KEY` and `SUPABASE_SERVICE_ROLE_KEY` above are the default local development keys — safe to commit. They only work against your local Supabase instance.\n\n### Step 3: Deploy Migrations and Edge Functions on Merge\n\nThis workflow runs only when migration files or Edge Function source changes are pushed to `main`. It links the remote project and pushes changes to production.\n\n```yaml\n# .github\u002Fworkflows\u002Fsupabase-deploy.yml\nname: Deploy to Supabase\n\non:\n  push:\n    branches: [main]\n    paths:\n      - 'supabase\u002Fmigrations\u002F**'\n      - 'supabase\u002Ffunctions\u002F**'\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n\n      - name: Install Supabase CLI\n        uses: supabase\u002Fsetup-cli@v1\n        with:\n          version: latest\n\n      - name: Link project\n        run: npx supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_REF }}\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n\n      # Push pending migrations to production\n      - name: Push database migrations\n        run: npx supabase db push\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n          SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}\n\n      # Deploy all Edge Functions\n      - name: Deploy Edge Functions\n        run: npx supabase functions deploy\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n\n      # Regenerate types from production schema\n      - name: Generate production types\n        run: |\n          npx supabase gen types typescript --linked > src\u002Ftypes\u002Fdatabase.types.ts\n          echo \"Types generated from production schema\"\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n          SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}\n```\n\n## Preview Branches\n\nCreate isolated Supabase environments for each pull request. Each preview branch gets its own database with migrations applied, so reviewers can test against real infrastructure.\n\n```yaml\n# Add to your PR workflow\npreview:\n  runs-on: ubuntu-latest\n  if: github.event_name == 'pull_request'\n  steps:\n    - uses: actions\u002Fcheckout@v4\n\n    - name: Install Supabase CLI\n      uses: supabase\u002Fsetup-cli@v1\n      with:\n        version: latest\n\n    - name: Link project\n      run: npx supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_REF }}\n      env:\n        SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n\n    - name: Create preview branch\n      run: npx supabase branches create \"preview-${{ github.event.number }}\"\n      env:\n        SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n```\n\nPreview branches require a Supabase Pro plan or higher. Each branch incurs compute costs while running.\n\n## Database Test Example\n\nWrite pgTAP tests in `supabase\u002Ftests\u002F` to validate RLS policies and schema constraints in CI:\n\n```sql\n-- supabase\u002Ftests\u002Frls_validation.test.sql\nbegin;\nselect plan(3);\n\n-- All public tables must have RLS enabled\nselect is(\n  (select count(*)::int from pg_tables\n   where schemaname = 'public' and rowsecurity = false),\n  0,\n  'All public tables have RLS enabled'\n);\n\n-- Verify anon role cannot read protected data\nset role anon;\nselect is_empty(\n  'select * from public.profiles',\n  'anon role cannot read profiles without auth'\n);\nreset role;\n\n-- Verify authenticated users can only see their own rows\nset role authenticated;\nselect isnt_empty(\n  $$select * from pg_policies where tablename = 'profiles' and cmd = 'SELECT'$$,\n  'profiles table has a SELECT policy for authenticated users'\n);\nreset role;\n\nselect * from finish();\nrollback;\n```\n\nRun locally with `npx supabase test db` before pushing.\n\n## Application Test Pattern\n\nUse `createClient` from `@supabase\u002Fsupabase-js` in tests, pointing at the local instance:\n\n```typescript\n\u002F\u002F tests\u002Fsetup.ts\nimport { createClient } from '@supabase\u002Fsupabase-js';\nimport type { Database } from '..\u002Fsrc\u002Ftypes\u002Fdatabase.types';\n\nexport const supabase = createClient\u003CDatabase>(\n  process.env.SUPABASE_URL ?? 'http:\u002F\u002F127.0.0.1:54321',\n  process.env.SUPABASE_ANON_KEY ?? 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'\n);\n\n\u002F\u002F tests\u002Fprofiles.test.ts\nimport { supabase } from '.\u002Fsetup';\n\ntest('can insert and read a profile', async () => {\n  const { data, error } = await supabase\n    .from('profiles')\n    .insert({ id: 'test-user', display_name: 'Test' })\n    .select()\n    .single();\n\n  expect(error).toBeNull();\n  expect(data?.display_name).toBe('Test');\n});\n```\n\n## Output\n\nAfter implementing these workflows:\n\n- Pull requests run tests against a fresh local Supabase instance with all migrations applied\n- TypeScript type drift is detected automatically — stale types block the PR\n- Database migrations deploy to production only on merge to main\n- Edge Functions deploy alongside migration changes\n- pgTAP tests validate RLS policies and schema constraints in CI\n- Preview branches provide isolated environments for PR review (Pro plan)\n- GitHub secrets keep `SUPABASE_ACCESS_TOKEN` and `SUPABASE_DB_PASSWORD` out of code\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `supabase start` fails in CI | Docker not available | Use `ubuntu-latest` runner (includes Docker by default) |\n| `supabase db push` returns \"permission denied\" | Invalid or expired access token | Regenerate token at supabase.com\u002Fdashboard\u002Faccount\u002Ftokens |\n| `supabase link` fails | Wrong project ref | Check project ref in Settings > General, must match `SUPABASE_PROJECT_REF` secret |\n| Type drift detected in PR | Schema changed without regenerating types | Run `npx supabase gen types typescript --local > src\u002Ftypes\u002Fdatabase.types.ts` |\n| `supabase functions deploy` fails | Missing Deno types or syntax errors | Run `npx supabase functions serve` locally first to catch issues |\n| pgTAP tests fail | Missing RLS policies or schema constraints | Add policies before merging — `npx supabase test db` runs locally |\n| Preview branch creation fails | Free plan limitation | Preview branches require Supabase Pro plan |\n| Migration conflict on push | Divergent migration history | Run `npx supabase db pull` to reconcile remote vs local migrations |\n\n## Examples\n\n**Minimal CI for a new project** — just migration validation and type checking:\n\n```yaml\nname: Supabase CI\non: [pull_request]\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: supabase\u002Fsetup-cli@v1\n        with: { version: latest }\n      - run: npx supabase start -x realtime,storage-api,imgproxy,inbucket,edge-runtime\n      - run: npx supabase db reset\n      - run: npx supabase gen types typescript --local > \u002Ftmp\u002Ftypes.ts && diff src\u002Ftypes\u002Fdatabase.types.ts \u002Ftmp\u002Ftypes.ts\n      - if: always()\n        run: npx supabase stop\n```\n\n**Edge Function deploy with verification:**\n\n```bash\n# Deploy a specific function and verify it's live\nnpx supabase functions deploy my-function --project-ref $PROJECT_REF\ncurl -s \"https:\u002F\u002F$PROJECT_REF.supabase.co\u002Ffunctions\u002Fv1\u002Fmy-function\" \\\n  -H \"Authorization: Bearer $SUPABASE_ANON_KEY\" | jq .\n```\n\n## Resources\n\n- [Supabase CLI in CI\u002FCD](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Flocal-development\u002Fcli\u002Fgetting-started) — official setup guide\n- [Database Testing with pgTAP](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Flocal-development\u002Ftesting) — writing and running database tests\n- [Managing Environments](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdeployment\u002Fmanaging-environments) — staging, production, preview branches\n- [Edge Functions Deployment](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Ffunctions\u002Fdeploy) — deploying Deno functions\n- [Type Generation](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fapi\u002Frest\u002Fgenerating-types) — keeping TypeScript types in sync\n- [Branching & Preview](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdeployment\u002Fbranching) — per-PR database environments\n- [@supabase\u002Fsupabase-js Reference](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Freference\u002Fjavascript\u002Fintroduction) — client SDK documentation\n\n## Next Steps\n\nFor deploying Supabase-backed applications to hosting platforms, see `supabase-deploy-integration`. For configuring RLS policies, see `supabase-rls-policies`.\n","# Supabase CI Integration\n\n## Overview\n\nBuild GitHub Actions workflows that automate the full Supabase lifecycle: link projects in CI, push migrations on merge, deploy Edge Functions, generate TypeScript types, run tests against a local Supabase instance, and create preview branches for pull requests. Every database change gets validated before it reaches production.\n\n## Prerequisites\n\n- GitHub repository with Actions enabled\n- Supabase project created at [supabase.com\u002Fdashboard](https:\u002F\u002Fsupabase.com\u002Fdashboard)\n- Supabase CLI initialized locally (`npx supabase init`)\n- Node.js 18+ in your project\n- `@supabase\u002Fsupabase-js` installed:\n\n```bash\nnpm install @supabase\u002Fsupabase-js\n```\n\n## Instructions\n\n### Step 1: Configure GitHub Secrets and Link in CI\n\nStore credentials as GitHub repository secrets. The CI pipeline uses these to authenticate with your Supabase project without exposing tokens in code.\n\n```bash\n# Set secrets via GitHub CLI\ngh secret set SUPABASE_ACCESS_TOKEN --body \"\u003Cyour-access-token>\"\ngh secret set SUPABASE_DB_PASSWORD --body \"\u003Cyour-database-password>\"\ngh secret set SUPABASE_PROJECT_REF --body \"\u003Cyour-project-ref>\"\n```\n\nGenerate your access token at [supabase.com\u002Fdashboard\u002Faccount\u002Ftokens](https:\u002F\u002Fsupabase.com\u002Fdashboard\u002Faccount\u002Ftokens). Find your project ref in Project Settings > General.\n\nLink the project in any CI job that needs remote access:\n\n```yaml\n- name: Install Supabase CLI\n  uses: supabase\u002Fsetup-cli@v1\n  with:\n    version: latest\n\n- name: Link Supabase project\n  run: npx supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_REF }}\n  env:\n    SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n```\n\n### Step 2: CI Workflow — Test, Validate Migrations, and Generate Types\n\nThis workflow starts a local Supabase instance, applies migrations, generates types, and runs your test suite on every pull request. It catches schema drift, broken migrations, and test failures before merge.\n\n```yaml\n# .github\u002Fworkflows\u002Fsupabase-ci.yml\nname: Supabase CI\n\non:\n  pull_request:\n    branches: [main]\n  push:\n    branches: [main]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Install Supabase CLI\n        uses: supabase\u002Fsetup-cli@v1\n        with:\n          version: latest\n\n      # Start local Supabase (disable unused services for speed)\n      - name: Start local Supabase\n        run: npx supabase start -x realtime,storage-api,imgproxy,inbucket\n\n      # Apply all migrations and seed data from scratch\n      - name: Validate migrations\n        run: npx supabase db reset\n\n      # Generate types and detect drift from committed version\n      - name: Generate and verify TypeScript types\n        run: |\n          npx supabase gen types typescript --local > src\u002Ftypes\u002Fdatabase.types.ts\n          git diff --exit-code src\u002Ftypes\u002Fdatabase.types.ts || {\n            echo \"::error::TypeScript types are out of sync with database schema\"\n            echo \"Run: npx supabase gen types typescript --local > src\u002Ftypes\u002Fdatabase.types.ts\"\n            exit 1\n          }\n\n      # Run pgTAP database tests\n      - name: Run database tests\n        run: npx supabase test db\n\n      # Run application tests against local Supabase\n      - name: Run application tests\n        run: npm test\n        env:\n          SUPABASE_URL: http:\u002F\u002F127.0.0.1:54321\n          SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0\n          SUPABASE_SERVICE_ROLE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU\n\n      - name: Type check\n        run: npx tsc --noEmit\n\n      - name: Stop Supabase\n        if: always()\n        run: npx supabase stop\n```\n\nThe `SUPABASE_ANON_KEY` and `SUPABASE_SERVICE_ROLE_KEY` above are the default local development keys — safe to commit. They only work against your local Supabase instance.\n\n### Step 3: Deploy Migrations and Edge Functions on Merge\n\nThis workflow runs only when migration files or Edge Function source changes are pushed to `main`. It links the remote project and pushes changes to production.\n\n```yaml\n# .github\u002Fworkflows\u002Fsupabase-deploy.yml\nname: Deploy to Supabase\n\non:\n  push:\n    branches: [main]\n    paths:\n      - 'supabase\u002Fmigrations\u002F**'\n      - 'supabase\u002Ffunctions\u002F**'\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n\n      - name: Install Supabase CLI\n        uses: supabase\u002Fsetup-cli@v1\n        with:\n          version: latest\n\n      - name: Link project\n        run: npx supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_REF }}\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n\n      # Push pending migrations to production\n      - name: Push database migrations\n        run: npx supabase db push\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n          SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}\n\n      # Deploy all Edge Functions\n      - name: Deploy Edge Functions\n        run: npx supabase functions deploy\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n\n      # Regenerate types from production schema\n      - name: Generate production types\n        run: |\n          npx supabase gen types typescript --linked > src\u002Ftypes\u002Fdatabase.types.ts\n          echo \"Types generated from production schema\"\n        env:\n          SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n          SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}\n```\n\n## Preview Branches\n\nCreate isolated Supabase environments for each pull request. Each preview branch gets its own database with migrations applied, so reviewers can test against real infrastructure.\n\n```yaml\n# Add to your PR workflow\npreview:\n  runs-on: ubuntu-latest\n  if: github.event_name == 'pull_request'\n  steps:\n    - uses: actions\u002Fcheckout@v4\n\n    - name: Install Supabase CLI\n      uses: supabase\u002Fsetup-cli@v1\n      with:\n        version: latest\n\n    - name: Link project\n      run: npx supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_REF }}\n      env:\n        SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n\n    - name: Create preview branch\n      run: npx supabase branches create \"preview-${{ github.event.number }}\"\n      env:\n        SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n```\n\nPreview branches require a Supabase Pro plan or higher. Each branch incurs compute costs while running.\n\n## Database Test Example\n\nWrite pgTAP tests in `supabase\u002Ftests\u002F` to validate RLS policies and schema constraints in CI:\n\n```sql\n-- supabase\u002Ftests\u002Frls_validation.test.sql\nbegin;\nselect plan(3);\n\n-- All public tables must have RLS enabled\nselect is(\n  (select count(*)::int from pg_tables\n   where schemaname = 'public' and rowsecurity = false),\n  0,\n  'All public tables have RLS enabled'\n);\n\n-- Verify anon role cannot read protected data\nset role anon;\nselect is_empty(\n  'select * from public.profiles',\n  'anon role cannot read profiles without auth'\n);\nreset role;\n\n-- Verify authenticated users can only see their own rows\nset role authenticated;\nselect isnt_empty(\n  $$select * from pg_policies where tablename = 'profiles' and cmd = 'SELECT'$$,\n  'profiles table has a SELECT policy for authenticated users'\n);\nreset role;\n\nselect * from finish();\nrollback;\n```\n\nRun locally with `npx supabase test db` before pushing.\n\n## Application Test Pattern\n\nUse `createClient` from `@supabase\u002Fsupabase-js` in tests, pointing at the local instance:\n\n```typescript\n\u002F\u002F tests\u002Fsetup.ts\nimport { createClient } from '@supabase\u002Fsupabase-js';\nimport type { Database } from '..\u002Fsrc\u002Ftypes\u002Fdatabase.types';\n\nexport const supabase = createClient\u003CDatabase>(\n  process.env.SUPABASE_URL ?? 'http:\u002F\u002F127.0.0.1:54321',\n  process.env.SUPABASE_ANON_KEY ?? 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'\n);\n\n\u002F\u002F tests\u002Fprofiles.test.ts\nimport { supabase } from '.\u002Fsetup';\n\ntest('can insert and read a profile', async () => {\n  const { data, error } = await supabase\n    .from('profiles')\n    .insert({ id: 'test-user', display_name: 'Test' })\n    .select()\n    .single();\n\n  expect(error).toBeNull();\n  expect(data?.display_name).toBe('Test');\n});\n```\n\n## Output\n\nAfter implementing these workflows:\n\n- Pull requests run tests against a fresh local Supabase instance with all migrations applied\n- TypeScript type drift is detected automatically — stale types block the PR\n- Database migrations deploy to production only on merge to main\n- Edge Functions deploy alongside migration changes\n- pgTAP tests validate RLS policies and schema constraints in CI\n- Preview branches provide isolated environments for PR review (Pro plan)\n- GitHub secrets keep `SUPABASE_ACCESS_TOKEN` and `SUPABASE_DB_PASSWORD` out of code\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `supabase start` fails in CI | Docker not available | Use `ubuntu-latest` runner (includes Docker by default) |\n| `supabase db push` returns \"permission denied\" | Invalid or expired access token | Regenerate token at supabase.com\u002Fdashboard\u002Faccount\u002Ftokens |\n| `supabase link` fails | Wrong project ref | Check project ref in Settings > General, must match `SUPABASE_PROJECT_REF` secret |\n| Type drift detected in PR | Schema changed without regenerating types | Run `npx supabase gen types typescript --local > src\u002Ftypes\u002Fdatabase.types.ts` |\n| `supabase functions deploy` fails | Missing Deno types or syntax errors | Run `npx supabase functions serve` locally first to catch issues |\n| pgTAP tests fail | Missing RLS policies or schema constraints | Add policies before merging — `npx supabase test db` runs locally |\n| Preview branch creation fails | Free plan limitation | Preview branches require Supabase Pro plan |\n| Migration conflict on push | Divergent migration history | Run `npx supabase db pull` to reconcile remote vs local migrations |\n\n## Examples\n\n**Minimal CI for a new project** — just migration validation and type checking:\n\n```yaml\nname: Supabase CI\non: [pull_request]\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: supabase\u002Fsetup-cli@v1\n        with: { version: latest }\n      - run: npx supabase start -x realtime,storage-api,imgproxy,inbucket,edge-runtime\n      - run: npx supabase db reset\n      - run: npx supabase gen types typescript --local > \u002Ftmp\u002Ftypes.ts && diff src\u002Ftypes\u002Fdatabase.types.ts \u002Ftmp\u002Ftypes.ts\n      - if: always()\n        run: npx supabase stop\n```\n\n**Edge Function deploy with verification:**\n\n```bash\n# Deploy a specific function and verify it's live\nnpx supabase functions deploy my-function --project-ref $PROJECT_REF\ncurl -s \"https:\u002F\u002F$PROJECT_REF.supabase.co\u002Ffunctions\u002Fv1\u002Fmy-function\" \\\n  -H \"Authorization: Bearer $SUPABASE_ANON_KEY\" | jq .\n```\n\n## Resources\n\n- [Supabase CLI in CI\u002FCD](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Flocal-development\u002Fcli\u002Fgetting-started) — official setup guide\n- [Database Testing with pgTAP](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Flocal-development\u002Ftesting) — writing and running database tests\n- [Managing Environments](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdeployment\u002Fmanaging-environments) — staging, production, preview branches\n- [Edge Functions Deployment](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Ffunctions\u002Fdeploy) — deploying Deno functions\n- [Type Generation](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fapi\u002Frest\u002Fgenerating-types) — keeping TypeScript types in sync\n- [Branching & Preview](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdeployment\u002Fbranching) — per-PR database environments\n- [@supabase\u002Fsupabase-js Reference](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Freference\u002Fjavascript\u002Fintroduction) — client SDK documentation\n\n## Next Steps\n\nFor deploying Supabase-backed applications to hosting platforms, see `supabase-deploy-integration`. For configuring RLS policies, see `supabase-rls-policies`.\n",{"name":5,"tags":24,"author":30,"license":15,"version":31,"description":32,"allowed-tools":33,"compatible-with":34},[25,26,27,28,29],"saas","supabase","ci-cd","github-actions","devops","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Configure Supabase CI\u002FCD pipelines with GitHub Actions: link projects,\npush migrations, deploy Edge Functions, generate types, and run tests\nagainst local Supabase instances.\nUse when setting up CI pipelines for Supabase, automating database\nmigrations, deploying Edge Functions in CI, or running integration tests.\nTrigger with phrases like \"supabase CI\", \"supabase GitHub Actions\",\n\"supabase deploy pipeline\", \"CI supabase migrations\", \"supabase preview branches\".\n","Read, Write, Edit, Bash(npx:*), Bash(gh:*), Grep","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--supabase-pack--supabase-ci-integration",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill supabase-ci-integration",{"tool":50,"command":51},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill supabase-ci-integration",{"tool":53,"command":54},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill supabase-ci-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--supabase-pack--supabase-ci-integration\u002FSKILL.md",true,[],[59,66,73,80,87,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]