Uploads a local file to the AMRZNN dashboard data repository via the GitHub Contents API. Creates the file if it does not yet exist, or overwrites it if it does. No local git installation or repository clone is required.
Path to the local file to upload.
Target path within the repository, e.g. "umcg/weekly_resistance.csv". Forward slashes only.
A GitHub Personal Access Token (PAT) with Contents: Write permission on the AMRZNN/dashboard_data repository. Defaults to the token returned by gh::gh_token().
Commit message to use. Defaults to "Automated upload: <Sys.Date()>".
Target repository in owner/repo format. Defaults to "AMRZNN/dashboard_data" and should not normally be changed.
If TRUE, prints a confirmation message on success. Defaults to TRUE.
Invisibly returns the HTTP status code of the PUT response (200L for update, 201L for new file).
Script taken from https://github.com/AMRZNN/dashboard_data/blob/9c7b65857f5467713fc3e3b01a5c7d4f1144b961/upload_script.R.
if (FALSE) { # \dontrun{
amrznn_upload(
local_file = "output/weekly_resistance.csv",
repo_path = "certe/weekly_resistance.csv"
)
} # }