mirror of
https://github.com/cloudflare/pages-action
synced 2024-11-27 13:29:57 +00:00
Merge pull request #55 from nisheretail/better-environment-names
This commit is contained in:
commit
22d9e5e143
2
index.js
2
index.js
|
@ -22157,7 +22157,7 @@ try {
|
||||||
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 githubBranch = import_process.env.GITHUB_REF_NAME;
|
||||||
const productionEnvironment = githubBranch === project.production_branch;
|
const productionEnvironment = githubBranch === project.production_branch;
|
||||||
const environmentName = productionEnvironment ? "Production" : `Preview: (${githubBranch})`;
|
const environmentName = `${projectName} (${productionEnvironment ? "Production" : "Preview"})`;
|
||||||
let gitHubDeployment;
|
let gitHubDeployment;
|
||||||
if (gitHubToken && gitHubToken.length) {
|
if (gitHubToken && gitHubToken.length) {
|
||||||
const octokit = (0, import_github.getOctokit)(gitHubToken);
|
const octokit = (0, import_github.getOctokit)(gitHubToken);
|
||||||
|
|
|
@ -126,7 +126,7 @@ try {
|
||||||
|
|
||||||
const githubBranch = env.GITHUB_REF_NAME;
|
const githubBranch = env.GITHUB_REF_NAME;
|
||||||
const productionEnvironment = githubBranch === project.production_branch;
|
const productionEnvironment = githubBranch === project.production_branch;
|
||||||
const environmentName = productionEnvironment ? "Production" : `Preview: (${githubBranch})`;
|
const environmentName = `${projectName} (${productionEnvironment ? "Production" : "Preview"})`;
|
||||||
|
|
||||||
let gitHubDeployment: Awaited<ReturnType<typeof createGitHubDeployment>>;
|
let gitHubDeployment: Awaited<ReturnType<typeof createGitHubDeployment>>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue