Merge pull request #56 from yonicd/refactor_req_check #186
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: R-mac | |
jobs: | |
check: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
if: "!contains(github.event.head_commit.message, 'skip osx')" | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: macOS-latest, r: 'release', args: "--no-manual"} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
CRAN: ${{ matrix.config.cran }} | |
GITHUB_PAT: ${{secrets.GH_PAT}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-tinytex@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- 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 XQuartz on macOS | |
if: runner.os == 'macOS' | |
run: brew install --cask xquartz | |
- name: Cache R packages | |
uses: actions/cache@v1 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }} | |
- name: Install magick | |
run: brew install imagemagick potrace | |
- name: install tex libs | |
run: | | |
install.packages('tinytex') | |
tinytex::tlmgr_install(c('standalone', 'xcolor', 'booktabs', 'multirow', 'amsmath', 'listings', 'setspace', 'caption', 'graphics', 'tools', 'psnfss', 'varwidth', 'colortbl', 'epstopdf-pkg', 'pgf','makeindex')) | |
shell: Rscript {0} | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::rcmdcheck, any::pkgdown, yonicd/covrpage@actions, local::. | |
needs: | | |
check | |
website | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
upload-snapshots: true | |
- name: covrpage | |
if: github.ref == 'refs/heads/master' | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
Rscript -e 'covrpage::covrpage_ci()' | |
git commit tests/README.md -m 'Update tests/README.Rmd' || echo "No changes to commit" | |
git push https://${{github.actor}}:${{secrets.GITHUB_PAT}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to commit" | |
- name: Build site | |
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | |
shell: Rscript {0} | |
- name: Deploy to GitHub pages 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@4.1.4 | |
with: | |
clean: false | |
branch: gh-pages | |
folder: docs |