docs: 🐛 remove branch context + add amplitude option

Signed-off-by: jffarge <jf@dagger.io>
This commit is contained in:
jffarge 2021-06-24 17:39:55 +02:00
parent e838fdb6a3
commit 598df7350b
2 changed files with 1 additions and 7 deletions

View File

@ -17,12 +17,6 @@
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../docs/" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../docs/"
command = "yarn build:withoutAuth" command = "yarn build:withoutAuth"
[context.docs-analytics]
# Do not build the site if there's no site-related changes since the last
# deploy.
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../docs/"
command = "yarn build"
[[redirects]] [[redirects]]
from = "/github-proxy/*" from = "/github-proxy/*"
to = "https://github.com/:splat" to = "https://github.com/:splat"

View File

@ -178,7 +178,7 @@ function DocPage(props) {
var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), {
apiEndpoint: `${window.location.hostname}/t` apiEndpoint: `${window.location.hostname}/t`
}); });
amplitude.getInstance().logEvent('Docs View', { "path": window.location.pathname }); amplitude.getInstance().logEvent('Docs View', { "hostname": window.location.hostname, "path": window.location.pathname });
} }
}) })
} }