From f03bce0e9799a661f9952b4be30ff026d4bc45f0 Mon Sep 17 00:00:00 2001 From: jangorecki Date: Sat, 19 Oct 2024 20:17:02 +0200 Subject: [PATCH] verbose deploy --- .github/workflows/pkgup.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkgup.yaml b/.github/workflows/pkgup.yaml index c365367..8e697c2 100644 --- a/.github/workflows/pkgup.yaml +++ b/.github/workflows/pkgup.yaml @@ -44,13 +44,15 @@ jobs: mkdir -p .pkgup/doc/vignettes echo -e "output:\n litedown::html_format:\n options:\n toc:\n depth: 4\n litedown::latex_format:\n meta:\n documentclass: \"book\"\n\nbook:\n new_session: false\n subdir: true\n pattern: \"[.]R?md$\"\n chapter_before: \"Information before a chapter.\"\n chapter_after: \"This chapter was generated from `$input$`.\"" > .pkgup/doc/_litedown.yml echo -e "---\nsite:\n rebuild: \"outdated\"\n pattern: \"[.]R?md$\"\n---\n\n```{r, echo=FALSE}\nlitedown::pkg_desc()\n```\n\nTo cite the package:\n\n```{r, echo=FALSE}\nlitedown::pkg_citation()\n```" > .pkgup/doc/index.Rmd + #Rscript -e 'litedown::pkg_manual()' > .pkgup/doc/manual.Rmd echo -e "```{r, echo=FALSE}\nlitedown::pkg_manual()\n```" > .pkgup/doc/manual.Rmd + #Rscript -e 'litedown::pkg_news(recent=0)' > .pkgup/doc/news.Rmd echo -e "```{r, echo=FALSE}\nlitedown::pkg_news(recent=0)\n```" > .pkgup/doc/news.Rmd echo -e "```{r, echo=FALSE, results='asis'}\nrmd = list.files(\"./vignettes\", \"*.Rmd\", full.names=TRUE)\nif (!length(rmd)) {\n cat(\"no vignettes\\n\")\n} else {\n title = function(f) {\n title1 = function(f) {\n if (!file.exists(f))\n stop(\"file \", f, \" does not exists\")\n l = readLines(f)\n t = paste(head(strsplit(basename(f), \".\", fixed=TRUE)[[1L]], -1L), collapse=\".\") ## default, basename without extension\n for (i in seq_along(l)) {\n if (substr(l[i], 1L, 6L) != \"title:\")\n next\n t = trimws(gsub(\"title:\", \"\", l[i], fixed=TRUE))\n break\n }\n t\n }\n sapply(f, title1)\n }\n html = paste0(substr(rmd, 1L, nchar(rmd)-3L), \"html\")\n lapply(html, function(f) cat(sprintf(\"[%s](%s)\\n\", title(rmd), f))) |> invisible()\n}\n```" > .pkgup/doc/vignettes.Rmd cp -r vignettes/* .pkgup/doc/vignettes/ R CMD INSTALL $(ls -1t pkgup_*.tar.gz | head -n 1) Rscript -e 'litedown::fuse_site(".pkgup/doc")' - #ls -aR .pkgup/doc + ls -aR .pkgup/doc - name: repo if: github.ref == 'refs/heads/master' run: |