Azure / Azure/static-web-apps

production_branch option does not work with pull_request trigger in GitHub Action

Open
#1,663 0 comments 4 reactions 1 assignee Claimed by @LongOddCode View on GitHub
bug
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

I have an Angular application with 4 environments Dev, UAT, Staging and Production.
The process we want to follow for new feature addition is as follows:
1. Create a new feature branch from the main branch.
2. Build the feature and create a pull request.
3. Pull request will trigger the deployment in an Azure static app specific for Development.
4. After successful deployment in development App, workflow will wait for the approval for UAT, Staging deployment, which again will deploy the new feature in the UAT, staging Apps.
5. After verification in UAT and Staging the branch will be merged into main and deployed to Production Azure static app.

Now problem here is, I am not able to deploy to the production environment of an Azure static app on pull_request trigger even after using production_branch option. Although I can deploy to production environment from a specific branch on a push trigger.
So I was wondering, if it's possible to use the production_branch option with pull_request trigger in GitHub Action.

**To Reproduce**
Steps to reproduce the behavior:
1. Try to deploy to the production environment of an Azure static app on pull_request trigger of GitHub Action.

**Expected behavior**
I should be able to deploy to production environment of an app from a specific branch on pull request trigger as well, as it's possible on the push trigger.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Device info (if applicable):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.