Skip to content

Commit

Permalink
fix: improve log output
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Jul 6, 2021
1 parent 8b75e27 commit d616a87
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions cloudflare-statuscheck.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export default async function waitForDeployment(
) {
const apiUrl = `https://api.cloudflare.com/client/v4/accounts/${accountId}/pages/projects/${projectId}/deployments`

core.info(`Checking deployment status: ${deploymentId}`)

const { data } = await axios.get(apiUrl, {
headers: {
'X-Auth-Key': token,
Expand All @@ -23,6 +21,10 @@ export default async function waitForDeployment(

const build = data.result.filter((d) => d.id === deploymentId)[0]

core.info(
`Deployment status (#${build.shortId}) ${build.latest_stage.name}: ${build.latest_stage.status}`
)

if (!build) {
core.error(data)
core.setFailed('no build with this ID found.')
Expand Down
6 changes: 4 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit d616a87

Please sign in to comment.