Skip to contents

pkgdown Workflow

This GitHub Actions workflow automates the generation and deployment of documentation for an R package using pkgdown. The workflow supports multiple versions and offers flexibility in customization. This workflow uses rmarkdown to be able to generate html documentation from Rmd files (vignettes folder). This documentation is then stored in gh-pages branch (an orphan branch) and published. Note : this workflow is using InsightEngineering pkgdown multiversion action action.

Inputs

Required Inputs

  • r-version: The version of R to use. Default: ‘4.1’.

Optional Inputs

  • skip-multiversion-docs: Skip the creation of multi-version docs. Default: false. If set to True, a subfolder will be created under gh-pages (with the current github reference (branch/tag) name)
  • multiversion-docs-landing-page: Ref to use for the multiversion docs landing page. Default: main.
  • latest-tag-alt-name: An alternate name to use for ‘latest-tag’ for multiversion pkgdown docs. Default: ““.
  • branches-or-tags-to-list: Regular expression defining branches or tags listed under the ‘Versions’ dropdown menu. Default: ^main$|^devel$|^pre-release$|^latest-tag$|^cran-release$|^develop$|^v([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$.

Workflow Structure

pkgdown Job

This job runs the pkgdown process to generate documentation. It checks for [skip docs] in the commit message and, if not present, proceeds with the documentation generation. The documentation includes an additional script to fix rdrr.io links for pharmaverse packages.

multi-version-docs Job

This job, if triggered, deploys the multi-version documentation to the gh-pages branch. It checks for the skip-multiversion-docs input and [skip docs] in the commit message before proceeding.