diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3c792c143..262c1b4af 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -60,7 +60,7 @@ jobs: run: yarn workspace site build env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - VITE_AT_INTERNET_SITE_ID: ${{ needs.deploy-context.outputs.env-name == 'master' && 617190 || 617189 }} + VITE_AT_INTERNET_SITE_ID: ${{ vars.VITE_AT_INTERNET_SITE_ID }} VITE_ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} VITE_ALGOLIA_SEARCH_KEY: ${{secrets.ALGOLIA_SEARCH_KEY}} VITE_ALGOLIA_INDEX_PREFIX: monentreprise-${{needs.deploy-context.outputs.env-name}}- diff --git a/site/.env.template b/site/.env.template index 409e6c59e..2723f7002 100644 --- a/site/.env.template +++ b/site/.env.template @@ -16,7 +16,6 @@ VITE_ALGOLIA_APP_ID= VITE_ALGOLIA_SEARCH_KEY= VITE_ALGOLIA_INDEX_PREFIX=monentreprise-master- VITE_AT_INTERNET_SITE_ID= -VITE_AT_INTERNET_DEV_SITE_ID= VITE_FR_BASE_URL="http://localhost:3000/mon-entreprise" VITE_EN_BASE_URL="http://localhost:3000/infrance" diff --git a/site/source/components/Provider.tsx b/site/source/components/Provider.tsx index 25c396135..5704ac5cc 100644 --- a/site/source/components/Provider.tsx +++ b/site/source/components/Provider.tsx @@ -117,11 +117,7 @@ function TrackingProvider({ children }: { children: React.ReactNode }) { script.async = true script.onload = () => { - const siteId = ( - !import.meta.env.SSR - ? import.meta.env.VITE_AT_INTERNET_SITE_ID - : import.meta.env.VITE_AT_INTERNET_DEV_SITE_ID - ) as string + const siteId = import.meta.env.VITE_AT_INTERNET_SITE_ID const ATTrackerClass = createTracker( siteId,