Skip to content

Commit

Permalink
fix deploy trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaz9 committed Jul 10, 2024
1 parent d04451f commit a804404
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/cms/src/deploys/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ export default defineEndpoint({
})
.then((res) => res.data.workflow_runs[0])

if (
last?.status &&
["requested", "queued", "pending", "waiting"].includes(last.status)
) {
if (last?.status && ["requested", "queued", "pending", "waiting"].includes(last.status)) {
return res.status(200).json(last)
}

Expand All @@ -60,7 +57,7 @@ export default defineEndpoint({
const newRun = await github.actions.createWorkflowDispatch({
owner,
repo,
workflow_id: "main.yml",
workflow_id: "deploy.yml",
ref: "main",
})
return res.status(200).json(newRun.data)
Expand Down

0 comments on commit a804404

Please sign in to comment.