Skip to content

Commit

Permalink
asdasd
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-cafecito committed Dec 8, 2024
1 parent 1c6efb7 commit a39b847
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion scripts/devcycle.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}`);
Expand Down

0 comments on commit a39b847

Please sign in to comment.