Skip to content

Commit

Permalink
Add workflow for GA4
Browse files Browse the repository at this point in the history
  • Loading branch information
soos3d committed Jul 22, 2024
1 parent 4154882 commit 33b2ae4
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 17 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-mint-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update mint.json with GA4 Measurement ID

on:
push:
branches:
- main
workflow_dispatch:

jobs:
update-mint-json:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install jq
run: sudo apt-get install jq

- name: Update mint.json with GA4 Measurement ID
run: |
if [ -z "$GA4_MEASUREMENT_ID" ]; then
echo "GA4_MEASUREMENT_ID is not set"
exit 1
fi
jq '.analytics.ga4.measurementId = env.GA4_MEASUREMENT_ID' mint.json > mint.json.tmp
mv mint.json.tmp mint.json
env:
GA4_MEASUREMENT_ID: ${{ secrets.GA4_MEASUREMENT_ID }}

- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add mint.json
git commit -m 'Update GA4 measurement ID in mint.json'
git push
65 changes: 48 additions & 17 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
"light": "#e44be0",
"dark": "#9d32de"
},
"feedback": {
"thumbsRating": true,
"raiseIssue": true,
"suggestEdit": true
},
"analytics": {
"ga4": {
"measurementId": "GA4_MEASUREMENT_ID"
}
},
"topbarCtaButton": {
"name": "Dashboard",
"url": "https://dashboard.particle.network/#/login"
},
"repository": {
"url": "https://github.com/TABASCOatw/particle-network-mintlify"
}, "feedback": {
"thumbsRating": true,
"raiseIssue": true,
"suggestEdit": true
},
"topbarLinks": [
{
Expand Down Expand Up @@ -103,7 +109,10 @@
},
{
"group": "MISCELLANEOUS",
"pages": ["landing/more/audits", "landing/more/assets"]
"pages": [
"landing/more/audits",
"landing/more/assets"
]
},
{
"group": "TUTORIALS & DEMOS",
Expand All @@ -123,7 +132,10 @@
},
{
"group": "GETTING STARTED",
"pages": ["resources/overview", "resources/network-coverage"]
"pages": [
"resources/overview",
"resources/network-coverage"
]
},
{
"group": "QUICKSTART: WALLET ABSTRACTION",
Expand Down Expand Up @@ -204,15 +216,16 @@
"resources/integrations/partners/alchemy",
"resources/integrations/partners/openfort",
"resources/integrations/partners/biconomy",

"resources/integrations/partners/bob"
]
}
]
},
{
"group": "APIs & SDKs",
"pages": ["api-reference/introduction"]
"pages": [
"api-reference/introduction"
]
},
{
"group": "PARTICLE AUTH",
Expand All @@ -227,7 +240,10 @@
},
{
"group": "SDKs (Desktop)",
"pages": ["api-reference/auth/desktop-sdks/web", "api-reference/auth/desktop-sdks/unity"]
"pages": [
"api-reference/auth/desktop-sdks/web",
"api-reference/auth/desktop-sdks/unity"
]
},
{
"group": "SDKs (Mobile)",
Expand All @@ -242,7 +258,9 @@
},
{
"group": "SDKs (Multi-platform)",
"pages": ["api-reference/auth/multi/unreal"]
"pages": [
"api-reference/auth/multi/unreal"
]
}
]
},
Expand All @@ -252,7 +270,9 @@
"api-reference/connect/introduction",
{
"group": "SDKs (Desktop)",
"pages": ["api-reference/connect/desktop/web"]
"pages": [
"api-reference/connect/desktop/web"
]
},
{
"group": "SDKs (Mobile)",
Expand All @@ -272,7 +292,9 @@
"api-reference/wallet/introduction",
{
"group": "SDKs (Desktop)",
"pages": ["api-reference/wallet/desktop/web"]
"pages": [
"api-reference/wallet/desktop/web"
]
},
{
"group": "SDKs (Mobile)",
Expand All @@ -292,7 +314,9 @@
"api-reference/btc/introduction",
{
"group": "SDKs (Desktop)",
"pages": ["api-reference/btc/desktop/web"]
"pages": [
"api-reference/btc/desktop/web"
]
},
{
"group": "BTC Connect RPC",
Expand Down Expand Up @@ -387,7 +411,9 @@
},
{
"group": "SDKs (Desktop)",
"pages": ["api-reference/aa/sdks/desktop/web"]
"pages": [
"api-reference/aa/sdks/desktop/web"
]
},
{
"group": "SDKs (Mobile)",
Expand All @@ -403,16 +429,21 @@
},
{
"group": "DEBUGGING",
"pages": ["api-reference/debug/sdk", "api-reference/debug/api"]
"pages": [
"api-reference/debug/sdk",
"api-reference/debug/api"
]
},
{
"group": "CHANGELOG",
"pages": ["changelog/logs"]
"pages": [
"changelog/logs"
]
}
],
"footerSocials": {
"x": "https://twitter.com/ParticleNtwrk",
"github": "https://github.com/Particle-Network",
"discord": "https://discord.com/invite/2y44qr6CR2"
}
}
}

0 comments on commit 33b2ae4

Please sign in to comment.