File tree Expand file tree Collapse file tree 6 files changed +14
-4
lines changed
Expand file tree Collapse file tree 6 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " wrangler-action " : minor
3+ ---
4+
5+ Added the new DEPLOYMENT_NAME 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 name for GitHub Deployments
190+ deploymentName: 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 @@ -26,7 +26,8 @@ const config: WranglerActionConfig = {
2626 tmpdir ( ) ,
2727 `wranglerArtifacts-${ crypto . randomUUID ( ) } ` ,
2828 ) } `,
29- GITHUB_TOKEN : getInput ( "gitHubToken" , { required : false } ) ,
29+ GITHUB_TOKEN : getInput ( "gitHubToken" ) ,
30+ DEPLOYMENT_NAME : getInput ( "deploymentName" ) ,
3031} as const ;
3132
3233const packageManager = getPackageManager ( config . PACKAGE_MANAGER , {
Original file line number Diff line number Diff line change @@ -95,14 +95,15 @@ export async function createGitHubDeploymentAndJobSummary(
9595 pagesArtifactFields . deployment_trigger
9696 ) {
9797 const octokit = getOctokit ( config . GITHUB_TOKEN ) ;
98+ const environment = config . DEPLOYMENT_NAME || pagesArtifactFields . environment ;
9899 const [ createGitHubDeploymentRes , createJobSummaryRes ] =
99100 await Promise . allSettled ( [
100101 createGitHubDeployment ( {
101102 config,
102103 octokit,
104+ environment,
103105 deploymentUrl : pagesArtifactFields . url ,
104106 productionBranch : pagesArtifactFields . production_branch ,
105- environment : pagesArtifactFields . environment ,
106107 deploymentId : pagesArtifactFields . deployment_id ,
107108 projectName : pagesArtifactFields . pages_project ,
108109 } ) ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export const wranglerActionConfig = z.object({
2929 PACKAGE_MANAGER : z . string ( ) ,
3030 WRANGLER_OUTPUT_DIR : z . string ( ) ,
3131 GITHUB_TOKEN : z . string ( ) ,
32+ DEPLOYMENT_NAME : z . string ( ) . optional ( ) ,
3233} ) ;
3334
3435function startGroup ( config : WranglerActionConfig , name : string ) : void {
You can’t perform that action at this time.
0 commit comments