Skip to content

Commit f35b3da

Browse files
committed
Add analytics
1 parent ff40ec7 commit f35b3da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/build-deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,12 @@ jobs:
10591059
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tsbrowse/docs/stable\" />" > site/tsbrowse/docs/index.html
10601060
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tsdate/docs/stable\" />" > site/tsdate/docs/index.html
10611061
echo "<meta http-equiv=\"Refresh\" content=\"0; url=/tszip/docs/latest\" />" > site/tszip/docs/index.html
1062+
1063+
- name: Inject analytics code
1064+
run: |
1065+
# Find all HTML files and inject analytics code before closing </head> tag
1066+
find site -type f \( -name "*.html" -o -name "*.htm" \) -exec sed -i 's|</head>|<script data-goatcounter="https://tskit.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>\n</head>|' {} \;
1067+
10621068
- name: List site contents
10631069
run: |
10641070
ls -R

0 commit comments

Comments
 (0)