Skip to content

Commit

Permalink
Fix: Handle pre-deploy statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-kunapuli committed Nov 28, 2023
1 parent 8f5f29f commit a13d9ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ type RenderDeploy = {
| 'build_failed'
| 'update_failed'
| 'canceled'
| 'pre_deploy_in_progress'
| 'pre_deploy_failed'
service: RenderService
}

Expand Down Expand Up @@ -177,6 +179,7 @@ async function waitForDeploy(deployment: Deployment): Promise<void> {
switch (render?.status) {
case 'created':
case 'build_in_progress':
case 'pre_deploy_in_progress':
case 'update_in_progress':
if (await updateDeployment(deployment, 'in_progress')) {
Core.info(`Deployment still running... ⏱`)
Expand All @@ -189,6 +192,7 @@ async function waitForDeploy(deployment: Deployment): Promise<void> {
Core.info(`Deployment ${render.id} succeeded ✅`)
return
case 'build_failed':
case 'pre_deploy_failed':
case 'update_failed':
await updateDeployment(deployment, 'failure')

Expand Down

0 comments on commit a13d9ba

Please sign in to comment.