Skip to content

Commit

Permalink
Add logic to Get the Page
Browse files Browse the repository at this point in the history
  • Loading branch information
Smitha Borkar authored and GitHub committed Jun 7, 2022
1 parent 43f9924 commit 0543630
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const axios = require('axios')



async function getPageBaseUrl(evtOrExitCodeOrError) {
async function getPageBaseUrl() {
try {
if (deployment.requestedDeployment) {
const pagesEndpoint = `https://api.github.com/repos/${process.env.GITHUB_REPOSITORY}/pages`
Expand All @@ -26,6 +26,15 @@ async function getPageBaseUrl(evtOrExitCodeOrError) {
}
} catch (e) {
console.info('Get on the Page failed', e)
process.exit(1)
}
}


async function main() {
try {
await getPageBaseUrl()
} catch (error) {
core.setFailed(error)
}
process.exit(isNaN(+evtOrExitCodeOrError) ? 1 : +evtOrExitCodeOrError)
}

0 comments on commit 0543630

Please sign in to comment.