deployment_environment: doesn't work
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I followed these link.
https://learn.microsoft.com/en-us/azure/static-web-apps/named-environments?tabs=github-actions
https://github.com/Azure/static-web-apps/discussions/787
This is the action
```
name: Deploy documentation for development
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, closed]
branches:
- develop
- "dev/**"
- "feat/**"
paths:
- "web/**"
- "media/**"
jobs:
deploy_dev_doc:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
environment:
name: development
url: https://mango-desert-0545fe40f-development.eastus2.5.azurestaticapps.net
steps:
- name: 🛎 Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: 🚀 Build and deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "./web"
api_location: ""
output_location: "build"
deployment_environment: "development"
```
**Expected behavior**
I should have this URL `https://mango-desert-0545fe40f-development.eastus2.5.azurestaticapps.net` generated in the Azure Static Web App, but I have this one `https://mango-desert-0545fe40f-78.eastus2.5.azurestaticapps.net/.auth/login/aad/callback` which it takes the PR's ID.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the workflow configuration in the issue and compare its deployment_environment setting with the linked Azure named-environments documentation and discussion. Reproduce the pull-request deployment and determine whether the generated URL uses the requested environment name or the PR ID; done means the expected development URL is produced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, github-actions
- Domain
- ci-cd, cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100