First you create a "deployment" event, and then you need to update the status to success/failure.
I think environment needs to be the package name when we create the deployment in the monorepo, because it is assumed a subsequent deployment to the same environment overwrites the previous one.
res <- gh::gh('POST /repos/r-universe/jeroen/deployments',
ref = '6b77ffa52ed26eea46697f5428d2ab1235284066',
task = 'deploy', environment = 'curl',
description = 'Deploy to https://jeroen.r-universe.dev/curl',
auto_merge=FALSE,
required_contexts=vector())
res2 <- gh::gh('POST /repos/r-universe/jeroen/deployments/{deployment_id}/statuses',
deployment_id = res$id, state = 'success', target_url = 'https://jeroen.r-universe.dev/curl',
description = 'Deployment to r-universe was successful!')
First you create a "deployment" event, and then you need to update the status to success/failure.
I think
environment
needs to be the package name when we create the deployment in the monorepo, because it is assumed a subsequent deployment to the same environment overwrites the previous one.