From b2b43b555d08e8605693ac77ce9f770167f5e46f Mon Sep 17 00:00:00 2001 From: LiNk-NY Date: Thu, 26 Oct 2023 14:54:00 -0400 Subject: [PATCH] add build_site.yml to RELEASE_3_18 branch --- .github/workflows/build_site.yml | 70 ++++++++++++++++++++++++++++++++ .github/workflows/pr_check.yml | 50 ----------------------- 2 files changed, 70 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/build_site.yml delete mode 100644 .github/workflows/pr_check.yml diff --git a/.github/workflows/build_site.yml b/.github/workflows/build_site.yml new file mode 100644 index 0000000..112cdc9 --- /dev/null +++ b/.github/workflows/build_site.yml @@ -0,0 +1,70 @@ +name: Release R CMD check and build site + +on: + push: + branches: + - RELEASE_3_18 + +jobs: + checkRelease: + runs-on: ubuntu-22.04 + container: bioconductor/bioconductor_docker:RELEASE_3_18 + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CRAN: https://packagemanager.posit.co/cran/__linux__/jammy/latest + version-name: RELEASE_3_18 + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + ref: RELEASE_3_18 + + - name: Query dependencies + run: | + BiocManager::install("remotes") + 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: ${{ runner.os }}-r-${{ env.version-name }}-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-r-${{ env.version-name }}- + + - name: Install Dependencies + run: | + remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories()) + BiocManager::install(c("rcmdcheck", "pkgdown"), ask = FALSE, update = TRUE) + shell: Rscript {0} + + - name: System dependencies + run: | + pip install ghp-import + + - name: Check Package + id: rcmdcheck + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check") + shell: Rscript {0} + + - name: Build 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: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages # The branch the action should deploy to. + FOLDER: docs # The folder the action should deploy. diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml deleted file mode 100644 index 08245f8..0000000 --- a/.github/workflows/pr_check.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Devel PR CMD check - -on: - push: - branches-ignore: - - devel - - RELEASE_3_* - pull_request: - branches: - - devel - -jobs: - checkDevel: - runs-on: ubuntu-22.04 - container: bioconductor/bioconductor_docker:devel - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Query dependencies - run: | - BiocManager::install(c("remotes", "Bioconductor/BiocManager")) - 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@v1 - with: - path: /usr/local/lib/R/site-library - key: ${{ runner.os }}-r-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-r-1- - - - name: Install Dependencies - run: | - options(repos = c(CRAN = "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest")) - remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories()) - BiocManager::install(c("rcmdcheck", "BiocCheck"), ask = FALSE, update = TRUE) - shell: Rscript {0} - - - name: Check Package - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check") - shell: Rscript {0}