Writes a GitHub Actions workflow file so the pipeline
runs on every push to GitHub. Historical runs accumulate in the
targets-runs branch, and the latest output is restored before
tar_make() so up-to-date targets do not rerun.
tar_github_actions( path = file.path(".github", "workflows", "targets.yaml"), ask = NULL )
Character of length 1, file path to write the GitHub Actions workflow file.
Logical, whether to ask before writing if the workflow file
already exists. If
Nothing (invisibly). This function writes a GitHub Actions workflow file as a side effect.
Steps to set up continuous deployment:
Ensure your pipeline stays within the resource limitations of
GitHub Actions and repositories, both for storage and compute.
For storage, you may wish to reduce the burden with
AWS-backed storage formats like
Ensure Actions are enabled in your GitHub repository. You may have to visit the Settings tab.
targets::tar_renv(extras = character(0))
to expose hidden package dependencies.
renv for your project (with
renv::snapshot()). Details at
renv.lock file to the
master Git branch.
tar_github_actions() to create the workflow file.
Commit this file to
main (recommended) or
master in Git.
Push your project to GitHub. Verify that a GitHub Actions
workflow runs and pushes results to
Subsequent runs will only recompute the outdated targets.