fix workflow file #38
This file contains hidden or 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] | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
container: bioconductor/bioconductor_docker:RELEASE_3_11 | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
steps: | |
- name: Checkout code | |
run: | | |
git clone https://github.com/${{ github.repository }} . | |
git checkout ${{ github.sha }} | |
- name: Query dependencies | |
run: | | |
install.packages('remotes') | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
shell: Rscript {0} | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
env: | |
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc | |
run: | | |
apt-get update | |
apt-get -y install libharfbuzz-dev libfribidi-dev | |
Rscript -e "remotes::install_github('r-hub/sysreqs')" | |
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") | |
sudo -s eval "$sysreqs" | |
- name: Install dependencies | |
# Change: Add the GH_PAT secret as an environment variable | |
env: | |
GITHUB_PAT: ${{ secrets.GH_PAT }} | |
run: | | |
options(repos = c(CRAN = "https://cloud.r-project.org")) | |
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) | |
BiocManager::install("rcmdcheck", update = TRUE, ask = FALSE) | |
shell: Rscript {0} | |
- name: Check | |
env: | |
_R_CHECK_CRAN_INCOMING_REMOTE_: false | |
GITHUB_PAT: ${{ secrets.GH_PAT }} # Also add here if check step accesses private repos | |
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check") | |
shell: Rscript {0} | |
- uses: docker/build-push-action@v5 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: ludwigg/subtypeheterogeneity | |
tag_with_ref: true | |
tag_with_sha: true | |
tags: latest | |
- name: Build pkgdown | |
env: | |
GITHUB_PAT: ${{ secrets.GH_PAT }} # Also add here for pkgdown | |
run: | | |
PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site(".")' | |
- name: Install deploy dependencies | |
run: | | |
apt-get update | |
apt-get -y install rsync | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: docs |