summary import { StaticSitesWorkflowPreviewRequest , WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function generatesAPreviewWorkflowFileForTheStaticSite ( ) { const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" ; const location = "West US 2" ; const staticSitesWorkflowPreviewRequest = { branch : "master" , buildProperties : { apiLocation : "api" , appArtifactLocation : "build" , appLocation : "app" } , repositoryUrl : "https://github.com/username/RepoName" } ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const result = await client . staticSites . previewWorkflow ( location , staticSitesWorkflowPreviewRequest ) ; console . log ( result ) ; } generatesAPreviewWorkflowFileForTheStaticSite ( ) . catch ( console . error ) ;