Introduction to GitHub Actions for R users
R-Ladies Abuja, Nigeria
Contact
Twitter: @BeaMilz
Blog: beamilz.com
About Bea
R-Ladies São Paulo Co-organizer
Teacher at Curso-R
Tidyverse instructor certified by RStudio
Scrape data from the internet
Run reports with RMarkdown or Quarto
Send emails
Save results
Deploy Shiny Apps.
.. And so on! Depends on what are your skills in R.
Run devtools::check()
Run tests
Build and update documentation and website
Git is a Version Control System (VCS).
It is able to store the change history of all files inside a folder, which we call a repository.
It becomes important as your work is collaborative.
Git is software that you can install on your computer.
GitHub is a service where you store and share Git repositories.
Used by millions of people in open or closed source projects.
Useful for collaborating with other programmers on data science projects.
There are alternatives such as GitLab and BitBucket.
GitHub is a website that you can access on the internet.
It is a service from GitHub
Allows us to automate code executions in the cloud.
GitHub Actions allows us to create workflows.
GH workflows are linked to repositories.
A workflow needs a description of Events and Jobs.
Events: describes what triggers the workflow: in what conditions should the workflow run?
Jobs: what the workflow should do? Imagine that its a brand new computer with no R installed, and we have to do all the setup in this step!
Documentation: https://docs.github.com/en/actions
Workflows are stored in .yaml
files.
The .yaml
files must be in a specific directory: .github/workflows/workflow-name.yaml
In the repository r-lib/actions there are some examples of GitHub Actions workflows that we can use and adapt.
Package {usethis}
is helpful to use some GHA workflows available in r-lib/actions: usethis::use_github_action()
function.
Start from an existing workflow file, and change what is necessary.
rstudio::conf(2022)
:Documentation: https://docs.github.com/en/actions
Everyone who is here today! :D
Creators and contributors of r-lib/actions
Slides by Beatriz Milz (@BeaMilz), made with Quarto and Quarto R-Ladies Theme. Code available on GitHub.