From a39b847065eafc5df5abf1d52d142732671f69ad Mon Sep 17 00:00:00 2001 From: Bert Cafecito <189543060+bert-cafecito@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:58:10 -0500 Subject: [PATCH] asdasd --- .github/workflows/static.yml | 2 +- scripts/devcycle.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 4478725..d6f1d59 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -34,7 +34,7 @@ jobs: - name: Inject Secrets into HTML run: | echo "Replacing placeholders with secrets" - sed -i "s|{{ DEVCYCLE_CLIENT_SDK_KEY }}|${{ secrets.DEVCYCLE_CLIENT_SDK_KEY }}|g" ./scripts/devcycle.js + sed -i "s|{{ SDK_KEY }}|${{ secrets.DEVCYCLE_CLIENT_SDK_KEY }}|g" ./scripts/devcycle.js - name: Setup Pages uses: actions/configure-pages@v5 - name: Upload artifact diff --git a/scripts/devcycle.js b/scripts/devcycle.js index 7e4fc38..090f0d0 100644 --- a/scripts/devcycle.js +++ b/scripts/devcycle.js @@ -1,6 +1,8 @@ // Initialize DevCycle SDK const { initializeDevCycle } = DevCycle; +const sdkKey = "{{ SDK_KEY }}"; // Placeholder for the secret + let devcycleClient; let gameMechanics = {}; // Store game mechanics let gameAccessibility = {}; // Store game accessibility settings @@ -11,7 +13,7 @@ const user = { isAnonymous: true }; async function init() { try { // Call initialize with the client key and a user object - devcycleClient = await initializeDevCycle(DEVCYCLE_CLIENT_SDK_KEY, user).onClientInitialized(); + devcycleClient = await initializeDevCycle(sdkKey, user).onClientInitialized(); useDevCycleVariable(); } catch (ex) { console.log(`Error initializing DevCycle: ${ex}`);