|
|
@ -22095,11 +22095,12 @@ try {
|
|
|
|
} = await response.json();
|
|
|
|
} = await response.json();
|
|
|
|
return deployment;
|
|
|
|
return deployment;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const githubBranch = import_process.env.GITHUB_HEAD_REF || import_process.env.GITHUB_REF_NAME;
|
|
|
|
const createGitHubDeployment = async (octokit, productionEnvironment, environment) => {
|
|
|
|
const createGitHubDeployment = async (octokit, productionEnvironment, environment) => {
|
|
|
|
const deployment = await octokit.rest.repos.createDeployment({
|
|
|
|
const deployment = await octokit.rest.repos.createDeployment({
|
|
|
|
owner: import_github.context.repo.owner,
|
|
|
|
owner: import_github.context.repo.owner,
|
|
|
|
repo: import_github.context.repo.repo,
|
|
|
|
repo: import_github.context.repo.repo,
|
|
|
|
ref: import_github.context.ref,
|
|
|
|
ref: githubBranch || import_github.context.ref,
|
|
|
|
auto_merge: false,
|
|
|
|
auto_merge: false,
|
|
|
|
description: "Cloudflare Pages",
|
|
|
|
description: "Cloudflare Pages",
|
|
|
|
required_contexts: [],
|
|
|
|
required_contexts: [],
|
|
|
@ -22156,7 +22157,6 @@ try {
|
|
|
|
const project = await getProject();
|
|
|
|
const project = await getProject();
|
|
|
|
if (!project)
|
|
|
|
if (!project)
|
|
|
|
throw new Error("Unable to find pages project");
|
|
|
|
throw new Error("Unable to find pages project");
|
|
|
|
const githubBranch = import_process.env.GITHUB_REF_NAME;
|
|
|
|
|
|
|
|
const productionEnvironment = githubBranch === project.production_branch;
|
|
|
|
const productionEnvironment = githubBranch === project.production_branch;
|
|
|
|
const environmentName = `${projectName} (${productionEnvironment ? "Production" : "Preview"})`;
|
|
|
|
const environmentName = `${projectName} (${productionEnvironment ? "Production" : "Preview"})`;
|
|
|
|
let gitHubDeployment;
|
|
|
|
let gitHubDeployment;
|
|
|
|