Deployment of pages with R-travis fails with pkgdown when vignettes includes the current package

gh-pages

#1

Hi,

I am trying to deploy on gh-pages with pkgdown, using the following code in .travis.yml

r_packages:
  - covr
  - pkgdown

after_success:
  - Rscript -e 'pkgdown::build_site()'
deploy:
   - provider: pages
     skip-cleanup: true
     github-token: $GITHUB_TOKEN
     local_dir: "docs"
      keep-history: true
     on:
       branch: master

The result of the Travis build shows that everything works fine until the call to build_article()

── Building articles 
 ───────────────────────────────────────────────────────────
Writing 'articles/index.html'
Reading 'vignettes/Import_data.Rmd'
Error in library(PLNmodels) : there is no package called 'PLNmodels'

Indeed, I need to load my own package in the vignette Import_data.Rmd : did I miss something in the Travis or pkgdown config ?

Note that the page build process works fine locally when I call the pkgdown::build_site() function.

Any idea ? @jimhester or @jeroen

Thanks