From 95784564066b366adbacf75a762eda4bb112f305 Mon Sep 17 00:00:00 2001 From: FelixErnst Date: Tue, 19 Mar 2024 18:41:00 +0100 Subject: [PATCH] Merged GHA config --- .github/workflows/R-CMD-check.yaml | 10 +++ .github/workflows/pkgdown.yaml | 105 ----------------------------- 2 files changed, 10 insertions(+), 105 deletions(-) delete mode 100644 .github/workflows/pkgdown.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 4ec82f1..742fd75 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -124,3 +124,13 @@ jobs: with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results path: check + + - name: Install package + run: | + R CMD INSTALL . + git config --global user.name ${{secrets.GH_USER}} + git config --global user.email ${{secrets.GH_EMAIL}} + + - name: Deploy Pkgdown to branch + run: pkgdown::deploy_to_branch(new_process = FALSE) + shell: Rscript {0} diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml deleted file mode 100644 index 370df3b..0000000 --- a/.github/workflows/pkgdown.yaml +++ /dev/null @@ -1,105 +0,0 @@ -on: - push: - branches: master - -name: pkgdown - -jobs: - pkgdown: - runs-on: ${{ matrix.config.os }} - - name: Pkgdown (${{ matrix.config.os }}-${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: ubuntu-22.04, r: '4.3', rspm: "https://demo.rstudiopm.com/all/__linux__/jammy/latest"} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} - TZ: UTC - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Setup R from r-lib - if: runner.os != 'Linux' - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - - - name: Setup pandoc from r-lib - if: runner.os != 'Linux' - uses: r-lib/actions/setup-pandoc@v2 - - - name: Install R packages for CI - run: | - install.packages('remotes') - remotes::install_github('r-hub/sysreqs') - shell: Rscript {0} - - - name: Install R packages for CI - run: | - install.packages('remotes') - remotes::install_github('r-hub/sysreqs') - shell: Rscript {0} - - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - shell: Rscript {0} - - - name: Restore R package cache - if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'" - uses: actions/cache@v3 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}- - - - name: Cache R packages on Linux - if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' " - uses: actions/cache@v3 - with: - path: /home/runner/work/_temp/Library - key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}- - - - name: Install system dependencies - if: runner.os == 'Linux' - env: - RHUB_PLATFORM: linux-x86_64-ubuntu-gcc - run: | - sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") - sudo -s eval "$sysreqs" - - - name: Install R dependencies - run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - remotes::install_cran("covr") - shell: Rscript {0} - - - name: Session info - run: | - options(width = 100) - pkgs <- installed.packages()[, "Package"] - sessioninfo::session_info(pkgs, include_base = TRUE) - shell: Rscript {0} - - - name: Install package - run: | - R CMD INSTALL . - git config --global user.name ${{secrets.GH_USER}} - git config --global user.email ${{secrets.GH_EMAIL}} - - - name: Deploy Pkgdown to branch - run: pkgdown::deploy_to_branch(new_process = FALSE) - shell: Rscript {0}