Skip to content

Commit

Permalink
Merge branch 'master' of github.com:waldronbios2/cunybios2
Browse files Browse the repository at this point in the history
  • Loading branch information
lwaldron committed Sep 9, 2022
2 parents 9481fd9 + f94115e commit a9a7c90
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ env:
IMAGE_NAME: ${{ github.repository }}
jobs:
job1:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
container: rocker/verse:4.2.0
steps:
- uses: actions/checkout@v2
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: true

# System dependencies
- name: Install apt dependencies
Expand Down Expand Up @@ -42,18 +45,6 @@ jobs:
key: ${{ runner.os }}-r-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-1-

- name: Create safe.directory
run: |
git config --global --add safe.directory /__w/cunybios2/cunybios2
git config --global --add safe.directory /home/rstudio
- name: Checkout submodules
uses: srt32/[email protected]

- name: What's in submodules
run: |
git submodule update --remote --merge
# This lets us augment with additional dependencies
- name: Install system dependencies
if: runner.os == 'Linux'
Expand Down Expand Up @@ -96,11 +87,19 @@ jobs:
email: [email protected]

- name: Deploy ð
uses: JamesIves/[email protected]
uses: JamesIves/github-pages-deploy-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
workspace: $GITHUB_WORKSPACE

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs # The folder the action should deploy.
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_PAT }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand All @@ -110,7 +109,7 @@ jobs:
with:
context: .
push: true
tags: user/app:latest
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand Down
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ COPY --chown=rstudio:rstudio . /home/rstudio/

RUN apt-get update --fix-missing && apt-get install -yq libssl-dev libpng-dev libnetcdf-dev libxml2-dev libxt6 libharfbuzz-dev libfribidi-dev libv8-dev

## get submodules

RUN git submodule init
RUN git submodule update

## install R package and dependencies

RUN Rscript -e "install.packages('devtools', ask=FALSE, Ncpus=max(1, parallel::detectCores(), na.rm=TRUE))"
RUN Rscript -e "devtools::install('.', dependencies=TRUE, build_vignettes=FALSE, Ncpus=max(1, parallel::detectCores(), na.rm=TRUE))"
RUN Rscript -e "devtools::install('.', dependencies=TRUE, build_vignettes=FALSE)"

RUN chown -R rstudio:rstudio /home/rstudio

0 comments on commit a9a7c90

Please sign in to comment.