|
|
|
@ -16115,6 +16115,7 @@ try {
|
|
|
|
|
const projectName = (0, import_core.getInput)("projectName", { required: true });
|
|
|
|
|
const directory = (0, import_core.getInput)("directory", { required: true });
|
|
|
|
|
const gitHubToken = (0, import_core.getInput)("gitHubToken", { required: true });
|
|
|
|
|
const environment = (0, import_core.getInput)("environment", { required: false });
|
|
|
|
|
const octokit = (0, import_github.getOctokit)(gitHubToken);
|
|
|
|
|
const createPagesDeployment = async () => {
|
|
|
|
|
await esm_default`
|
|
|
|
@ -16123,7 +16124,11 @@ try {
|
|
|
|
|
$ export CLOUDFLARE_ACCOUNT_ID="${accountId}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ${envrionment} {
|
|
|
|
|
$$ npx wrangler@2 pages publish "${directory}" --project-name="${projectName}" --env="$[environment}"
|
|
|
|
|
} else {
|
|
|
|
|
$$ npx wrangler@2 pages publish "${directory}" --project-name="${projectName}"
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
const response = await (0, import_undici.fetch)(`https://api.cloudflare.com/client/v4/accounts/${accountId}/pages/projects/${projectName}/deployments`, { headers: { Authorization: `Bearer ${apiToken}` } });
|
|
|
|
|
const {
|
|
|
|
|