File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " wrangler-action " : minor
3+ ---
4+
5+ Added the new ` deploymentEnvironment ` input param for the action. This param is responsible for the custom name of the GitHub Deployment
Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ jobs:
186186 command: pages deploy YOUR_DIST_FOLDER --project-name=example
187187 # Optional: Enable this if you want to have GitHub Deployments triggered
188188 gitHubToken: ${{ secrets.GITHUB_TOKEN }}
189+ # Optional: Add a custom deployment environment for GitHub Deployments
190+ deploymentEnvironment: Example Project
189191` ` `
190192
191193# ## Deploying on a schedule
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ function handleVersionsOutputCommand(config: WranglerActionConfig) {
125125 ) ;
126126}
127127
128- function handleDeprectatedStdoutParsing (
128+ function handleDeprecatedStdoutParsing (
129129 config : WranglerActionConfig ,
130130 command : string ,
131131 stdOut : string ,
@@ -162,7 +162,7 @@ export async function handleCommandOutputParsing(
162162
163163 if ( outputEntry === null ) {
164164 // if no outputEntry found, fallback to deprecated stdOut parsing
165- handleDeprectatedStdoutParsing ( config , command , stdOut ) ;
165+ handleDeprecatedStdoutParsing ( config , command , stdOut ) ;
166166 return ;
167167 }
168168
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ const config: WranglerActionConfig = {
2727 `wranglerArtifacts-${ crypto . randomUUID ( ) } ` ,
2828 ) } `,
2929 GITHUB_TOKEN : getInput ( "gitHubToken" , { required : false } ) ,
30+ DEPLOYMENT_ENVIRONMENT : getInput ( "deploymentEnvironment" , {
31+ required : false ,
32+ } ) ,
3033} as const ;
3134
3235const packageManager = getPackageManager ( config . PACKAGE_MANAGER , {
Original file line number Diff line number Diff line change @@ -95,14 +95,16 @@ export async function createGitHubDeploymentAndJobSummary(
9595 pagesArtifactFields . deployment_trigger
9696 ) {
9797 const octokit = getOctokit ( config . GITHUB_TOKEN ) ;
98+ const environment =
99+ config . DEPLOYMENT_ENVIRONMENT || pagesArtifactFields . environment ;
98100 const [ createGitHubDeploymentRes , createJobSummaryRes ] =
99101 await Promise . allSettled ( [
100102 createGitHubDeployment ( {
101103 config,
102104 octokit,
105+ environment,
103106 deploymentUrl : pagesArtifactFields . url ,
104107 productionBranch : pagesArtifactFields . production_branch ,
105- environment : pagesArtifactFields . environment ,
106108 deploymentId : pagesArtifactFields . deployment_id ,
107109 projectName : pagesArtifactFields . pages_project ,
108110 } ) ,
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export const wranglerActionConfig = z.object({
3030 PACKAGE_MANAGER : z . string ( ) ,
3131 WRANGLER_OUTPUT_DIR : z . string ( ) ,
3232 GITHUB_TOKEN : z . string ( ) ,
33+ DEPLOYMENT_ENVIRONMENT : z . string ( ) . optional ( ) ,
3334} ) ;
3435
3536function startGroup ( config : WranglerActionConfig , name : string ) : void {
You can’t perform that action at this time.
0 commit comments