79122665

Date: 2024-10-24 15:35:01
Score: 0.5
Natty:
Report link

How to create a unique URL for each PR?

Unlike Vercel, it is not possible to get a unique URL for each pull request in Azure Web Apps.

You have two options to get the unique URLs for each PR.

  1. Create new web apps dynamically for each PR.
  2. Creating a new deployment slot for each PR.

Since creating a new web app each time is not effective, it’s better to use deployment slots.

az webapp deployment slot swap --name <app_name> --resource-group <resource_group> --slot <slot_name> --target-slot <target_slot_name>

You can create deployment slot via below command via Azure CLI

az webapp deployment slot create --name <app_name> --resource-group <resource_group> --slot <slot_name>

Here you'll get a unique URL for each deployment slot.

enter image description here

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How to
  • Low reputation (0.5):
Posted by: Sirra Sneha