mirror of
https://github.com/actions/configure-pages.git
synced 2026-03-30 01:54:51 +00:00
Add logic to Get the Page
This commit is contained in:
13
src/index.js
13
src/index.js
@@ -3,7 +3,7 @@ const axios = require('axios')
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function getPageBaseUrl(evtOrExitCodeOrError) {
|
async function getPageBaseUrl() {
|
||||||
try {
|
try {
|
||||||
if (deployment.requestedDeployment) {
|
if (deployment.requestedDeployment) {
|
||||||
const pagesEndpoint = `https://api.github.com/repos/${process.env.GITHUB_REPOSITORY}/pages`
|
const pagesEndpoint = `https://api.github.com/repos/${process.env.GITHUB_REPOSITORY}/pages`
|
||||||
@@ -26,6 +26,15 @@ async function getPageBaseUrl(evtOrExitCodeOrError) {
|
|||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.info('Get on the Page failed', 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)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user