Skip to content

update for CRAN

update for CRAN #32

name: Build CRAN-style R Documentation
on:
workflow_dispatch:
push:
branches: [main, master]
jobs:
build_cran_docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Setup TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install dependencies
run: |
Rscript -e 'install.packages(c("roxygen2", "knitr", "rmarkdown", "devtools",
"stats", "graphics", "plot3D", "ggplot2",
"reshape2", "grid", "ggthemes", "tidyr",
"statebins", "ggrepel", "RColorBrewer", "scales", "gridExtra","parallel"))'
- name: Generate documentation
run: |
Rscript -e 'devtools::document()'
Rscript -e 'roxygen2::roxygenise()'
Rscript -e 'devtools::build_manual(path = ".")'
- name: Upload documentation as artifact
uses: actions/upload-artifact@v4
with:
name: cran-docs
path: ./*.pdf