Skip to content

Commit

Permalink
workflows(*): update to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
nteetor committed Jun 5, 2022
1 parent e15f2e6 commit a8248c1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 58 deletions.
53 changes: 23 additions & 30 deletions .github/workflows/pkgdown-site.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
56 changes: 28 additions & 28 deletions .github/workflows/r-cmd-check.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

0 comments on commit a8248c1

Please sign in to comment.