Skip to content

Commit

Permalink
Install package fully to get access to it's installed files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-ebs-ext committed Feb 6, 2025
1 parent 3c787da commit c62d384
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,16 @@ jobs:
# Render site
render_site <- function(){
if(file.exists('vignettes/qc.Rmd')){
#pkgdown::build_site(new_process = FALSE) # `new_process` because otherwise errors go unlogged
pkgdown::init_site()
devtools::load_all() # try to mimic the local installation that pkgdown::build_site does but pkgdown::build_article does not
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 c62d384

Please sign in to comment.