Skip to content

Commit

Permalink
Install package locally to allow for qc.html generation without runni…
Browse files Browse the repository at this point in the history
…ng full pkgdown::build_site twice.
  • Loading branch information
ml-ebs-ext committed Feb 6, 2025
1 parent bb5d9ed commit 3161baa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,15 @@ jobs:
render_site <- function(){
if(file.exists('vignettes/qc.Rmd')){
pkgdown::init_site()
devtools::install() # mimic the local installation that pkgdown::build_site does but pkgdown::build_article does not
pkgdown::build_article(name = 'qc')
file.rename(from = 'vignettes/qc.Rmd', to = 'vignettes/_qc.Rmd')
# This last step is not necessary now but, if we ever want to combine actions,
# it's better to restore the original name of the file.
# This block is written as a function to be able to lean on `on.exit`, btw.
on.exit(file.rename(from = 'vignettes/_qc.Rmd', to = 'vignettes/qc.Rmd'))
}
pkgdown::build_site(new_process = FALSE) # `new_process` because otherwise errors go unlogged
pkgdown::build_site(new_process = FALSE, install = FALSE) # `new_process` because otherwise errors go unlogged
}
render_site()
shell: Rscript {0}
Expand Down

0 comments on commit 3161baa

Please sign in to comment.