From d3de366f038e49a0c16ba2c6c3216632f2f1baed Mon Sep 17 00:00:00 2001 From: Max Edell Date: Wed, 2 Sep 2026 13:06:17 -0400 Subject: [PATCH] ci: pass meta-capi env vars through deploy workflows The meta-capi action selects the Meta pixel by runtime namespace (prod/stage/uat) and requires an access token, but none of these were wired into the deploy workflows, so the stage deployment is missing them. Add META_PIXEL_ID / META_PIXEL_ID_STAGE / META_PIXEL_ID_UAT and META_ACCESS_TOKEN passthrough to both stage and prod deploys, following the ebs-sync naming convention, and document the secrets in example.env. META_BASE_URL / META_API_VERSION have in-code defaults and are omitted. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/deploy_prod.yml | 7 +++++++ .github/workflows/deploy_stage.yml | 7 +++++++ example.env | 13 +++++++++++++ 3 files changed, 27 insertions(+) diff --git a/.github/workflows/deploy_prod.yml b/.github/workflows/deploy_prod.yml index 2b58cbd..fbe6fb7 100644 --- a/.github/workflows/deploy_prod.yml +++ b/.github/workflows/deploy_prod.yml @@ -81,6 +81,13 @@ jobs: EBS_JSON_API_KEY_STAGE: ${{ secrets.EBS_JSON_API_KEY_STAGE }} EDGE_COMMERCE_API_BASE: ${{ secrets.EDGE_COMMERCE_API_BASE_PROD }} EDGE_COMMERCE_API_BASE_STAGE: ${{ secrets.EDGE_COMMERCE_API_BASE_STAGE }} + # meta-capi — action picks the pixel by runtime namespace (prod/stage/uat), + # so all three pixel ids must be present regardless of deploy env. + # META_BASE_URL / META_API_VERSION have in-code defaults and are omitted. + META_PIXEL_ID: ${{ secrets.META_PIXEL_ID_PROD }} + META_PIXEL_ID_STAGE: ${{ secrets.META_PIXEL_ID_STAGE }} + META_PIXEL_ID_UAT: ${{ secrets.META_PIXEL_ID_UAT }} + META_ACCESS_TOKEN: ${{ secrets.META_ACCESS_TOKEN_PROD }} # recipe-notify — PROD is the only environment that sends the digest RECIPE_NOTIFY_ENABLED: "true" RECIPE_NOTIFY_TOKEN: ${{ secrets.RECIPE_NOTIFY_TOKEN_PROD }} \ No newline at end of file diff --git a/.github/workflows/deploy_stage.yml b/.github/workflows/deploy_stage.yml index 5d87016..af05a7d 100644 --- a/.github/workflows/deploy_stage.yml +++ b/.github/workflows/deploy_stage.yml @@ -80,6 +80,13 @@ jobs: EBS_JSON_API_KEY_STAGE: ${{ secrets.EBS_JSON_API_KEY_STAGE }} EDGE_COMMERCE_API_BASE: ${{ secrets.EDGE_COMMERCE_API_BASE_STAGE }} EDGE_COMMERCE_API_BASE_STAGE: ${{ secrets.EDGE_COMMERCE_API_BASE_STAGE }} + # meta-capi — action picks the pixel by runtime namespace (prod/stage/uat), + # so all three pixel ids must be present regardless of deploy env. + # META_BASE_URL / META_API_VERSION have in-code defaults and are omitted. + META_PIXEL_ID: ${{ secrets.META_PIXEL_ID_STAGE }} + META_PIXEL_ID_STAGE: ${{ secrets.META_PIXEL_ID_STAGE }} + META_PIXEL_ID_UAT: ${{ secrets.META_PIXEL_ID_UAT }} + META_ACCESS_TOKEN: ${{ secrets.META_ACCESS_TOKEN_STAGE }} # recipe-notify — RECIPE_NOTIFY_ENABLED intentionally NOT set on stage, # so the scheduled digest no-ops here (no duplicate emails). RECIPE_NOTIFY_TOKEN: ${{ secrets.RECIPE_NOTIFY_TOKEN_STAGE }} diff --git a/example.env b/example.env index 604c3e3..dc6c0ed 100644 --- a/example.env +++ b/example.env @@ -68,6 +68,19 @@ EDGE_COMMERCE_API_ORDERS_TOKEN_STAGE= EDGE_COMMERCE_API_ORDERS_TOKEN_PROD= EDGE_COMMERCE_API_ORDERS_TOKEN= +# meta-capi action — Meta Conversions API (server-to-server Purchase events). +# The action selects the pixel id by runtime namespace (prod/stage/uat), so all +# three pixel ids are deployed to every environment. +META_PIXEL_ID_STAGE= +META_PIXEL_ID_UAT= +META_PIXEL_ID_PROD= +# Meta system-user access token with the ads_management / business permission +# for the pixel(s) above. Env-specific: set to prod on prod, stage on stage. +META_ACCESS_TOKEN_STAGE= +META_ACCESS_TOKEN_PROD= +# META_BASE_URL (default https://graph.facebook.com) and META_API_VERSION +# (default v22.0) have in-code defaults; override only if they change. + # recipe-notify action — CalcMenu recipe journal API # All have sensible in-code defaults; override here only if they change. RECIPE_API_URL=https://vitamix.calcmenuweb.com/ws/service.asmx/GetUpdatedRecipes