Skip to content

Commit

Permalink
Always add tracking code
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed Oct 8, 2024
1 parent a5fda4c commit c11a52c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USER }}" --password-stdin
docker build -f Dockerfile.production . --tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/} \
--build-arg BUGSNAG_KEY="${{ secrets.BUGSNAG_KEY }}" --build-arg MAINNET_DOMAIN="restake.app" --build-arg TESTNET_DOMAIN="testnet.restake.app" --build-arg EMBED_ANALYTICS="1"
--build-arg BUGSNAG_KEY="${{ secrets.BUGSNAG_KEY }}" --build-arg MAINNET_DOMAIN="restake.app" --build-arg TESTNET_DOMAIN="testnet.restake.app"
docker tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/} ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}
docker push ghcr.io/${{ github.repository }}:latest
docker build -f Dockerfile.production . --tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-testnet \
--build-arg BUGSNAG_KEY="${{ secrets.BUGSNAG_KEY }}" --build-arg MAINNET_DOMAIN="restake.app" --build-arg TESTNET_DOMAIN="testnet.restake.app" --build-arg TESTNET_MODE="1" --build-arg EMBED_ANALYTICS="1"
--build-arg BUGSNAG_KEY="${{ secrets.BUGSNAG_KEY }}" --build-arg MAINNET_DOMAIN="restake.app" --build-arg TESTNET_DOMAIN="testnet.restake.app" --build-arg TESTNET_MODE="1"
docker tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-testnet ghcr.io/${{ github.repository }}:latest-testnet
docker push ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-testnet
docker push ghcr.io/${{ github.repository }}:latest-testnet
2 changes: 0 additions & 2 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ ARG MAINNET_DOMAIN
ENV MAINNET_DOMAIN=${MAINNET_DOMAIN}
ARG TESTNET_DOMAIN
ENV TESTNET_DOMAIN=${TESTNET_DOMAIN}
ARG EMBED_ANALYTICS
ENV EMBED_ANALYTICS=${EMBED_ANALYTICS}

RUN npm run build

Expand Down
2 changes: 2 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script async defer src="https://sa.restake.app/latest.js"></script>
<noscript><img src="https://sa.restake.app/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
</body>
</html>
6 changes: 0 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ const app = (
<Route path="/:network/:validator/:section" element={<NetworkFinder />} />
</Routes>
</BrowserRouter>
{process.env.EMBED_ANALYTICS === '1' && (
<>
<script async defer src="https://sa.restake.app/latest.js"></script>
<noscript><img src="https://sa.restake.app/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
</>
)}
</React.StrictMode>
)

Expand Down

0 comments on commit c11a52c

Please sign in to comment.