rename master to devel #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main, master, devel ] | |
pull_request: | |
branches: [main, master, devel ] | |
release: | |
types: [published] | |
workflow_dispatch: | |
name: pkgdown | |
jobs: | |
pkgdown: | |
runs-on: ubuntu-latest | |
name: ubuntu-latest devel bioc devel | |
container: bioconductor/bioconductor_docker:devel | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest | |
NOT_CRAN: true | |
TZ: UTC | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Set R Library home on Linux | |
run: | | |
mkdir /__w/_temp/Library | |
echo ".libPaths('/__w/_temp/Library')" > ~/.Rprofile | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Query dependencies | |
run: | | |
install.packages('remotes') | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
shell: Rscript {0} | |
- name: Cache R packages on Linux | |
if: "!contains(github.event.head_commit.message, '/nocache')" | |
uses: actions/cache@v2 | |
with: | |
path: /home/runner/work/_temp/Library | |
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} | |
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel- | |
- name: Install Linux system dependencies | |
run: | | |
sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))') | |
echo $sysreqs | |
sudo -s eval "$sysreqs" | |
- name: Install BiocManager | |
run: | | |
message(paste('****', Sys.time(), 'installing BiocManager ****')) | |
remotes::install_cran("BiocManager") | |
shell: Rscript {0} | |
- name: Set BiocVersion | |
run: | | |
BiocManager::install(version = "devel", ask = FALSE, force = TRUE) | |
shell: Rscript {0} | |
- name: Install dependencies pass 1 | |
run: | | |
gha_repos <- if( | |
.Platform$OS.type == "unix" && Sys.info()["sysname"] != "Darwin" | |
) c( | |
"AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/devel/bioc", | |
BiocManager::repositories() | |
) else BiocManager::repositories() | |
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) | |
install.packages(c("rcmdcheck", "BiocCheck"), repos = gha_repos) | |
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) | |
remotes::install_local(dependencies = TRUE, repos = gha_repos, build_vignettes = FALSE, upgrade = TRUE) | |
continue-on-error: true | |
shell: Rscript {0} | |
- name: Install dependencies pass 2 | |
run: | | |
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) | |
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE) | |
shell: Rscript {0} | |
- name: Install BiocGenerics | |
if: env.has_RUnit == 'true' | |
run: | | |
## Install BiocGenerics | |
BiocManager::install("BiocGenerics") | |
shell: Rscript {0} | |
- name: Install pkgdown | |
run: | | |
remotes::install_github("r-lib/pkgdown") | |
shell: Rscript {0} | |
- name: Install package | |
run: R CMD INSTALL . | |
- name: Build and deploy pkgdown site | |
run: | | |
PKG=`head DESCRIPTION -n 1 | sed 's,.* ,,'` | |
echo $PKG | |
git config --global --add safe.directory /__w/"$PKG"/"$PKG" | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)" | |
continue-on-error: true | |
shell: bash {0} |