Microsoft

Static Web App PR Workflow for Azure App Service using Azure DevOps Pt 2 (But what if my code is in GitHub)

Nov 19, 2020Abel
Static Web App PR Workflow for Azure App Service using Azure DevOps Pt 2 (But what if my code is in GitHub)
SummaryAI, from the source post

This post details how to adapt an existing Azure Static Web App PR workflow to use GitHub as the source code repository instead of Azure Repos. Key changes include: 1. Replacing the Azure DevOps REST API call for adding PR comments with a call to the GitHub REST API, requiring a GitHub Personal Access Token (PAT). 2. Generating and securely storing the GitHub PAT as a pipeline variable. 3. Updating the PowerShell script to use the GitHub API for posting comments to the PR. 4. Configuring Azure Pipelines to enable pull request validation for GitHub repositories, including options for handling forks and making secrets available to fork builds. 5. Providing the complete YAML configuration for the updated pipeline.

More from the Static Website Hosting Options Comparison trail