Skip to content

Commit

Permalink
shift cp vignettes to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Oct 18, 2024
1 parent a8c8b36 commit 9b1fb2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pkgup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
run: |
ls
R CMD INSTALL $(ls -1t pkgup_*.tar.gz | head -n 1) ## seems to be required
Rscript -e 'invisible(file.copy("vignettes", "pkgup", recursive=TRUE))'
Rscript -e 'reorder_input2 = function(x) {i = is_index(x); index = x[i][which.min(nchar(x[i]))]; c(index, rev(setdiff(x, index)))}; environment(reorder_input2) <- asNamespace("litedown"); assignInNamespace("reorder_input", reorder_input2, ns="litedown"); litedown::fuse_site("pkgup")' ## hacking litedown to rev order so ./vignettes/*.html are generated before their index ./vignettes.html
ls -R pkgup
mkdir -p public
Expand Down
12 changes: 6 additions & 6 deletions pkgup/vignettes.Rmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```{r, echo=FALSE, results='asis'}
if (tail(strsplit(getwd(), "/", fixed=TRUE)[[1L]], 1L) == "pkgup") {
unlink("./vignettes")
} else {
stop("vignettes.Rmd should be running from ./pkgup dir")
}
invisible(file.copy("../vignettes", ".", recursive=TRUE))
#if (tail(strsplit(getwd(), "/", fixed=TRUE)[[1L]], 1L) == "pkgup") {
# unlink("./vignettes")
#} else {
# stop("vignettes.Rmd should be running from ./pkgup dir")
#}
#invisible(file.copy("../vignettes", ".", recursive=TRUE))
rmd = list.files("./vignettes", "*.Rmd", full.names=TRUE)
if (!length(rmd)) {
cat("no vignettes\n")
Expand Down

0 comments on commit 9b1fb2d

Please sign in to comment.