Skip to content

Commit

Permalink
feat(docs): act-1490 - added env var
Browse files Browse the repository at this point in the history
  • Loading branch information
TrofimovAnton85 committed Sep 30, 2024
1 parent 04c1121 commit 2598d7b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
case:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
lint:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

lint:
name: Lint
Expand All @@ -34,6 +35,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

case:
name: Case
Expand All @@ -42,6 +44,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

all-jobs-completed:
name: All jobs completed
Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const config = {
VERCEL_ENV: process.env.VERCEL_ENV,
DASHBOARD_PREVIEW_URL: process.env.DASHBOARD_PREVIEW_URL,
SENTRY_KEY: process.env.SENTRY_KEY,
GF_SURVEY_KEY: process.env.GF_SURVEY_KEY,
},

trailingSlash: true,
Expand Down
5 changes: 4 additions & 1 deletion src/theme/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import React, {
import { Provider as AlertProvider } from "react-alert";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import BrowserOnly from "@docusaurus/BrowserOnly";
import siteConfig from "@generated/docusaurus.config";
import { AlertTemplate, options } from "@site/src/components/Alert";
import { MetaMaskSDK, SDKProvider } from "@metamask/sdk";
import {
Expand Down Expand Up @@ -129,11 +130,13 @@ export const LoginProvider = ({ children }) => {
} catch (e) {}
};

const { GF_SURVEY_KEY } = siteConfig.customFields;

useEffect(() => {
const provider = sdk?.getProvider();
setMetaMaskProvider(provider);
if ((window as any)?.usabilla && window?.innerWidth > 1720) {
(window as any)?.usabilla?.load("w.usabilla.com", "7a27ead270ba");
(window as any)?.usabilla?.load("w.usabilla.com", GF_SURVEY_KEY);
}
}, []);

Expand Down

0 comments on commit 2598d7b

Please sign in to comment.