-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #291 from Ambroos/add-pages-deployment-alias
Add deployment-alias-url for pages deployments with Wrangler 3.78.0+
- Loading branch information
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"wrangler-action": minor | ||
--- | ||
|
||
Adds `deployment-alias-url` output for Pages deployment aliases (since Wrangler v3.78.0): https://github.com/cloudflare/workers-sdk/pull/6643 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -347,6 +347,15 @@ async function wranglerCommands() { | |
deploymentUrl = deploymentUrlMatch[0].trim(); | ||
setOutput("deployment-url", deploymentUrl); | ||
} | ||
|
||
// And also try to extract the alias URL (since [email protected]) | ||
const aliasUrlMatch = stdOut.match( | ||
/alias URL: (https?:\/\/[a-zA-Z0-9-./]+)/, | ||
); | ||
if (aliasUrlMatch && aliasUrlMatch.length == 2 && aliasUrlMatch[1]) { | ||
const aliasUrl = aliasUrlMatch[1].trim(); | ||
setOutput("deployment-alias-url", aliasUrl); | ||
} | ||
} | ||
} | ||
} finally { | ||
|