diff --git a/README.md b/README.md index 71a8cc6..12f8d6f 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,12 @@ The configuration inputs `vercelProjectID`, `vercelOrgID`, and `vercelToken` can Type: `string` +- `originalDeploymentURL` + + Original URL of the deployment. Can be used to create your own alias in a separate task. + + Type: `string` + - `deploymentTaskMessage` The output from the deployment. Can be passed to Vercel Azure DevOps Pull Request Comment Task. diff --git a/vercel-deployment-task-source/src/index.ts b/vercel-deployment-task-source/src/index.ts index f6a9d72..6da8982 100644 --- a/vercel-deployment-task-source/src/index.ts +++ b/vercel-deployment-task-source/src/index.ts @@ -258,7 +258,8 @@ async function run() { ); } - let deployURL = stdout; + const originalDeployURL = stdout; + let deployURL = originalDeployURL; if (!deployToProduction) { if (branchName) { @@ -342,6 +343,7 @@ async function run() { } } + setVariable("originalDeploymentURL", originalDeployURL, false, true); setVariable("deploymentURL", deployURL, false, true); const message = `Successfully deployed to ${deployURL}`; setVariable("deploymentTaskMessage", message, false, true); diff --git a/vercel-deployment-task-source/task.json b/vercel-deployment-task-source/task.json index 215a452..edb6f74 100644 --- a/vercel-deployment-task-source/task.json +++ b/vercel-deployment-task-source/task.json @@ -70,6 +70,10 @@ "name": "deploymentURL", "description": "The URL of the deployment." }, + { + "name": "originalDeploymentURL", + "description": "Original URL of the deployment. Can be used to create your own alias in a separate task." + }, { "name": "deploymentTaskMessage", "description": "The message output from the deployment. Can be passed to Vercel Azure DevOps Pull Request Comment Task." @@ -80,4 +84,4 @@ "target": "dist/index.js" } } -} +} \ No newline at end of file