Skip to content

deploy-web.yml's edge-function step has never deployed anything to dev or preview #773

Closed

Description

@thinkclay

Found while bringing all three environments up to main.

What happens

The 🔧 Deploy Edge Functions step in deploy-web.yml picks its project ref by branch:

SUPABASE_PROJECT_ID: ${{ github.ref == 'refs/heads/prod'    && secrets.SUPABASE_PROJECT_ID
                      || github.ref == 'refs/heads/preview' && secrets.PREVIEW_SUPABASE_BRANCH_ID
                      ||                                       secrets.DEV_SUPABASE_BRANCH_ID }}

Two of those three secrets do not exist:

SUPABASE_ACCESS_TOKEN          present
SUPABASE_PROJECT_ID            present
PREVIEW_SUPABASE_BRANCH_ID     MISSING
DEV_SUPABASE_BRANCH_ID         MISSING

So the step's own guard fires and it exits 0:

⏭️ Supabase secrets not configured — skipping edge functions

and the step also carries continue-on-error: true, so even a real failure would be invisible. main (→ dev) and preview have therefore never deployed an edge function from CI. prod would work — it uses the secret that exists — but the prod branch has never triggered this workflow (#772).

How it showed

main and preview web deploys were succeeding while both APIs sat at 3bf189f7d from 2026-09-11 — the last time someone ran scripts/deploy-functions.sh by hand. The web half advanced, the API half did not, and nothing said so. On preview that meant a new frontend talking to a three-day-old API.

Verified by GET /v1/api/v1/health, which reports the commit baked in by the local script:

env before after a manual deploy-functions.sh
dev 3bf189f7d 1bdcc0dfd
preview 3bf189f7d 1bdcc0dfd

I ran those two deploys, so all three environments are on 1bdcc0dfd now. This issue is about the step, not the drift.

Also worth noting

CI deploys three functions (api job-import news); scripts/deploy-functions.sh deploys twelve and then runs smoke-remote.sh, which fails on commit skew. The CI path is both narrower and unverified.

Acceptance

  • Add DEV_SUPABASE_BRANCH_ID and PREVIEW_SUPABASE_BRANCH_ID, or change the step to use refs that exist — the values are already in scripts/deploy-functions.sh (dev pmtdqrfpumqwkdhpgwcz, preview uhjkipdwayqfihkanabk, prod qmfmpcyxsihhfttvqpbw)
  • A missing secret fails the step loudly rather than skipping — a deploy step that no-ops silently is worse than one that is absent
  • Drop continue-on-error: true, or keep it only for genuinely optional functions
  • Deploy the same set the local script does, and run smoke-remote.sh afterwards so commit skew fails the run
  • A check that web and API report the same commit after a deploy

Related: #772 (the prod branch is not the release mechanism either), #375.

Activity

  1. added
    bug
    on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions