I am unable to deploy a simple static website to Azure Static Web Apps using the Static Web Apps CLI.
Environment:
- Windows 11
- Azure Static Web Apps CLI: 2.0.10
- Deployment method: direct deployment using a deployment token
- Front-end consists of a simple index.html file
- No GitHub repository or Pull Request is being used
Command used:
swa deploy . --env production --deployment-token $token
The deployment fails with:
Deployment failed with exit code 1
The deployment binary exited with code 1.
I then ran:
swa deploy . --env production --deployment-token $token --dry-run --verbose
The detailed error is:
The content server has rejected the request with: BadRequest
Reason: Request is missing the pull request id.
The deployment is explicitly targeting the production environment and is using a valid deployment token.
I reproduced the issue with TWO different Azure Static Web Apps resources:
- contsales-presenca-teams
- contsales-presenca-teams-v2
Both resources were created independently and used different deployment tokens.
For both resources, the Production environment becomes stuck with:
status: "Uploading"
This was confirmed directly through Azure CLI using:
az staticwebapp environment show --name <resource-name> --resource-group ContSales-Presenca-Teams --environment-name default --output jsonc
For the second resource, the environment currently reports:
buildId: "default"
name: "default"
sourceBranch: null
pullRequestTitle: null
status: "Uploading"
StaticSitesClient.exe was also tested directly and executes normally, so this does not appear to be a missing native dependency issue.
Deployment IDs captured during troubleshooting:
First resource:
8c4bebc8-643b-4266-b584-5d0cac73cf2a
Second resource:
385e251b-e630-4a11-a3cc-732e205cc7f1
Because the same failure occurs on two independently created Static Web Apps with separate deployment tokens, I suspect there may be an issue with the Azure Static Web Apps content/deployment backend rather than the application files or local environment.
Could someone from the Azure Static Web Apps team please verify these Deployment IDs and determine why a direct production deployment using a deployment token is being rejected for a missing Pull Request ID?
Thank you.