Skip to content

Commit

Permalink
test new staging workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhong committed Sep 5, 2024
1 parent 76fa222 commit 9cb823b
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions .github/workflows/dev_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ jobs:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
container: bioconductor/bioconductor_docker:devel
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: TRUE
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CRAN: https://packagemanager.posit.co/cran/__linux__/jammy/latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'devel'

Expand All @@ -25,42 +30,20 @@ jobs:

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /usr/local/lib/R/site-library
key: ${{ runner.os }}-r-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-1-

# This lets us augment with additional dependencies
- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-

- name: Install dependencies
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
options(repos = c(CRAN = "https://cran.r-project.org"))
BiocManager::repositories()
remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories())
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Build pkgdown
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
PATH=$PATH:$HOME/bin/ Rscript -e 'BiocManager::install(c("knitr", "rmarkdown", "pkgdown")); pkgdown::build_site(".")'
# deploy needs rsync? Seems so.
Expand All @@ -69,7 +52,7 @@ jobs:
apt-get update
apt-get -y install rsync
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
Expand Down

0 comments on commit 9cb823b

Please sign in to comment.