remove r2u recipe, container incompatible with installed R #126
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
name: MAE Workshop Check | |
on: push | |
env: | |
cache-version: v2 | |
jobs: | |
checkdeploy: | |
runs-on: ubuntu-22.04 | |
container: bioconductor/bioconductor_docker:devel | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: TRUE | |
R_REMOTES_STANDALONE: TRUE | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
CRAN: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Query dependencies | |
run: | | |
BiocManager::install(c("remotes", "rcmdcheck")) | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
shell: Rscript {0} | |
- name: Cache R packages | |
if: runner.os != 'Windows' | |
uses: actions/cache@v3 | |
with: | |
path: /usr/local/lib/R/site-library | |
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ hashFiles('.github/depends.Rds') }} | |
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r- | |
- name: Install Package Dependencies | |
run: | | |
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) | |
BiocManager::install(update = TRUE, ask = FALSE) | |
shell: Rscript {0} | |
- name: Check Package | |
env: | |
_R_CHECK_CRAN_INCOMING_REMOTE_: false | |
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error", check_dir = "check") | |
shell: Rscript {0} | |
- name: Build pkgdown | |
run: | | |
PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site(".")' | |
# deploy needs rsync? Seems so. | |
- name: Install deploy dependencies | |
run: | | |
apt-get update | |
apt-get -y install rsync | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: docs # The folder the action should deploy. | |
dock: | |
runs-on: ubuntu-22.04 | |
needs: checkdeploy | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Register repo name | |
run: | | |
echo CONT_IMG_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and Push Docker | |
if: ${{ success() }} | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
tags: > | |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:latest, | |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:devel |