Skip to content

Commit

Permalink
plausible.io website traffic statistics (#5799)
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki authored Dec 6, 2023
1 parent d8f7a30 commit 25064ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ test-win-old:
after_script:
- mkdir -p bus/$CI_JOB_NAME
- '[ -d data.table.Rcheck ] && mv data.table.Rcheck bus/$CI_JOB_NAME/'
## no pattern matching in [, TODO when macos available
#- '[ -f data.table_*.tgz ] && mv $(ls -1t data.table_*.tgz | head -n 1) bus/$CI_JOB_NAME/'
- echo $CI_JOB_ID > bus/$CI_JOB_NAME/id
- echo $CI_JOB_STATUS > bus/$CI_JOB_NAME/status
Expand Down Expand Up @@ -300,7 +301,6 @@ integration:
- *install-deps ## markdown pkg not present in r-pkgdown image
- rm -rf ./vignettes ## r-lib/pkgdown#2383
- Rscript -e 'pkgdown::build_site(override=list(destination="./pkgdown"))'
- sed -i 's!<head>!<head><script defer data-domain="rdatatable.gitlab.io/data.table" src="https://plausible.io/js/script.js"></script>!g' pkgdown/index.html
## html manual, vignettes, repos, cran_web, cran_checks
- echo 'source(".ci/ci.R"); source(".ci/publish.R")' >> .Rprofile
## list of available test-* jobs dynamically based on bus/test-* directories
Expand Down Expand Up @@ -363,6 +363,8 @@ integration:
## pkgdown merge
- Rscript -e 'common_files<-function(path1, path2) intersect(list.files(path1, all.files=TRUE, no..=TRUE), list.files(path2, all.files=TRUE, no..=TRUE)); msg = if (length(f<-common_files("pkgdown","bus/integration/cran"))) paste(c("Following artifacts will be overwritten by pkgdown artifacts:", paste0(" ", f)), collapse="\n") else "No overlapping files from pkgdown artifacts"; message(msg); q("no")'
- mv pkgdown/* bus/integration/cran/
## add plausible.io stats
- find bus/integration/cran -type f -iname "*.html" | xargs sed -i 's!<head>!<head><script defer data-domain="rdatatable.gitlab.io/data.table" src="https://plausible.io/js/script.js"></script>!g'
<<: *artifacts

## publish
Expand Down
5 changes: 0 additions & 5 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,3 @@ navbar:
github:
icon: fab fa-github fa-lg
href: https://github.com/Rdatatable/data.table

templates:
includes:
in_header: |
<script defer data-domain="rdatatable.gitlab.io/data.table" src="https://plausible.io/js/script.js"></script>

0 comments on commit 25064ee

Please sign in to comment.