Skip to content

Commit

Permalink
verbose deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Oct 19, 2024
1 parent a894e13 commit f03bce0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pkgup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit f03bce0

Please sign in to comment.