Specific wording for GitHub Actions
In your github repository:
Actions
tabNew workflow
on the leftSet up a workflow yourself
The next 5 minutes:
.github/workflows/ci_example.yaml
R-CMD-check
check()
function passes for our function when we make changes to the repositorycheck-release.yaml
usethis::use_github_action("check-release")
on: [push, pull_request]
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ubuntu-latest
steps:
- name: Checkout files from GitHub version control repository
uses: actions/checkout@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install R packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- name: Checks if R package can be installed
uses: r-lib/actions/check-r-package@v2
You can make the R package install setup faster if you replace the runner
From:
use either windows-latest
or macos-latest
List of runners: https://github.com/actions/runner-images
If you want more…
usethis::use_pkgdown_github_pages()
function that sets up CD for your documentation site.gh-pages
branchCaution
docs/
directory so you don’t confuse youself and others.