diff --git a/.github/workflows/pkgdown-site.yml b/.github/workflows/pkgdown-site.yml index bb4490a5..c0a1a8be 100644 --- a/.github/workflows/pkgdown-site.yml +++ b/.github/workflows/pkgdown-site.yml @@ -1,46 +1,39 @@ on: push: - branches: master + branches: [main] + pull_request: + branches: [main] + release: + types: [published] name: pkgdown jobs: pkgdown: - runs-on: macOS-latest + runs-on: ubuntu-latest + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2) - shell: Rscript {0} + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true - - name: Cache R packages - uses: actions/cache@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: macOS-r-3.6-${{ hashFiles('depends.Rds') }} - restore-keys: macOS-r-3.6- + extra-packages: any::pkgdown, local::. - - name: Install dependencies - run: | - install.packages("remotes") - remotes::install_deps(dependencies = TRUE) - remotes::install_github("nteetor/pkgdown@master-nt-yonder") + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} - - name: Install package - run: R CMD INSTALL . - - - name: Deploy package - run: | - pkgdown::deploy_to_branch( - commit_message = "docs(site): rebuild", - new_process = FALSE - ) - shell: Rscript {0} + - name: Deploy site + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.github/workflows/r-cmd-check.yml b/.github/workflows/r-cmd-check.yml index 73e89543..a8735b00 100644 --- a/.github/workflows/r-cmd-check.yml +++ b/.github/workflows/r-cmd-check.yml @@ -1,12 +1,10 @@ -name: r-cmd-check - on: push: - branches: - - master + branches: [main] pull_request: - branches: - - master + branches: [main] + +name: r-cmd-check jobs: r-cmd-check: @@ -18,35 +16,37 @@ jobs: fail-fast: false matrix: config: - - { os: windows-latest, r: '3.6'} - - { os: macOS-latest, r: '3.6'} - - { os: macOS-latest, r: 'devel'} - - { os: ubuntu-16.04, r: '3.2', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - { os: ubuntu-16.04, r: '3.3', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - { os: ubuntu-16.04, r: '3.4', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - { os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} + - { os: macOS-latest, r: 'release' } + + - { os: windows-latest, r: 'release' } + - { os: windows-latest, r: '3.6' } + + - { os: ubuntu-18.04, r: 'devel', http-user-agent: 'release' } + - { os: ubuntu-18.04, r: 'release' } + - { os: ubuntu-18.04, r: 'oldrel-1'} + - { os: ubuntu-18.04, r: 'oldrel-2' } + - { os: ubuntu-18.04, r: 'oldrel-3' } + - { os: ubuntu-18.04, r: 'oldrel-4' } env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - CRAN: ${{ matrix.config.cran }} + R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true - - name: Install dependencies - run: Rscript -e "install.packages(c('remotes', 'rcmdcheck'))" -e "remotes::install_deps(dependencies = TRUE)" - - - name: Check - run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'never', check_dir = 'check')" + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check - - name: Upload check results - if: failure() - uses: actions/upload-artifact@master + - uses: r-lib/actions/check-r-package@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + upload-snapshots: true