-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
I wish to deploy my static web app + managed API using SWA CLI, however when I follow the deployment instructions the frontend deploys but the API doesn't.
- I have forked the Blazor Stater Application (see here: https://github.com/matt-j-griffin/urban-tribble/) and made no changes.
- In the repo route I run:
dotnet publish -c Release -o bin/publish. - In the repo route I run:
swa deploy ./bin/publish/wwwroot --api-location ./Api.
This fails as the API language and version cannot be identified.
- This time I provide the API language, version, environment and silly verbose:
swa deploy ./bin/publish/wwwroot --api-location ./Api --api-language dotnetisolated --api-version 8.0 --env production --verbose=silly.
This succeeds (see verbose output below), however the API does not deploy, you can see this in the image below and by navigating to the deployed site (https://polite-ocean-077f4ff1e.3.azurestaticapps.net/).
C:\urban-tribble> swa deploy ./bin/publish/wwwroot --api-location ./Api --api-language dotnetisolated --api-version 8.0 --env production --verbose=silly
Welcome to Azure Static Web Apps CLI (2.0.7)
Getting config file options from "swa-cli.config.json"...
Config file does not exist at "swa-cli.config.json"
Resolving outputLocation=./bin/publish/wwwroot full path...
Deploying front-end files from folder:
C:\urban-tribble\bin\publish\wwwroot
Deploying API from folder:
.\urban-tribble\Api
No deployment token found. Trying interactive login...
Checking Azure session...
Executing authenticateWithAzureIdentity
- details:
- tenantId: <undefined>
- clientId: <undefined>
- clientSecret: <undefined>
- useKeychain: true
Keychain is enabled
Executing swaCliPersistencePlugin
✔ Successfully logged into Azure!
Found an existing Azure config file, getting Tenant and Subscription Id from C:\Users\me\.azure\azureProfile.json
Selected tenant: <REDACTED>
Selected subscription: <REDACTED>
Project credentials:
- subscriptionId: <REDACTED>
- tenantId: <REDACTED>
- clientId: <undefined>
- clientSecret: <undefined>
Login successful
Checking project settings...
choose static site with initial: undefined
√ Choose your Static Web App » urban-tribble-rg/urban-tribble
Static site found!
- staticSite:
- id: /subscriptions/<REDACTED>/resourceGroups/urban-tribble-rg/providers/Microsoft.Web/staticSites/urban-tribble
- name: urban-tribble
- location: West US 2
- type: Microsoft.Web/staticSites
- sku:
- name: Free
- tier: Free
- defaultHostname: polite-ocean-077f4ff1e.3.azurestaticapps.net
- repositoryUrl:
- branch:
- customDomains:
- privateEndpointConnections:
- stagingEnvironmentPolicy: Enabled
- allowConfigFileUpdates: true
- contentDistributionEndpoint: https://content-wus2.infrastructure.3.azurestaticapps.net
- keyVaultReferenceIdentity: SystemAssigned
- userProvidedFunctionApps:
- linkedBackends:
- provider: SwaCli
- enterpriseGradeCdnStatus: Disabled
- publicNetworkAccess:
- databaseConnections:
Project settings:
- resourceGroup: urban-tribble-rg
- staticSiteName: urban-tribble
- subscriptionId: <REDACTED>
✔ Successfully setup project!
No swa-cli.config.json file found. Skipping saving project settings.
Deployment token provided via remote configuration
- deploymentToken: <hidden>
Deploying to environment: production
Trying to read workflow config with values:
- appLocation: C:\urban-tribble
- outputLocation: C\urban-tribble\bin\publish\wwwroot
- apiLocation: C:\urban-tribble\Api
- dataApiLocation: <undefined>
Found a SWA workflow file: C\urban-tribble\.github\workflows\azure-static-web-apps-zealous-smoke-0ba00241e.yml
- app_build_command: <undefined>
- api_build_command: <undefined>
- app_location: ./Client
- output_location: wwwroot
- api_location: Api
- data_api_location: <undefined>
Validating user workflow config (BEFORE):
- appLocation: C:\urban-tribble
- outputLocation: C:\urban-tribble\bin\publish\wwwroot
- apiLocation: C:\urban-tribble\Api
- dataApiLocation: <undefined>
Validating user workflow config (AFTER):
- appLocation: C:\urban-tribble
- apiLocation: C:\urban-tribble\Api
- outputLocation: C:\urban-tribble\bin\publish\wwwroot
- dataApiLocation: <undefined>
Workflow configuration:
- config:
- appBuildCommand: <undefined>
- apiBuildCommand: <undefined>
- appLocation: C:\urban-tribble
- apiLocation: C:\urban-tribble\Api
- outputLocation: C:\urban-tribble\bin\publish\wwwroot
- dataApiLocation: <undefined>
- files:
- 0: C:\urban-tribble\.github\workflows\azure-static-web-apps-zealous-smoke-0ba00241e.yml
Reading content from staticwebapp.config.json...
Parsing C:\urban-tribble\Client\staticwebapp.config.json...
Content parsed successfully
Found configuration file:
C:\urban-tribble\Client\staticwebapp.config.json
Deploying project to Azure Static Web Apps...
Fetching release metadata for version: stable. Please wait...
GET https://aka.ms/swalocaldeploy
Decode JSON: [
{
"version": "latest",
"buildId": "694f9b1be52be00b1b4cde5deb5bb4994154f9b6",
"publishDate": "2025-07-21T07:21:52.0658686Z",
"files": {
"linux-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/linux/StaticSitesClient",
"sha": "3fdeaa74fff3e8136fa95f994761559b48900f094214dc81c98f825de506a398"
},
"win-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/windows/StaticSitesClient.exe",
"sha": "f55f0efd65b1b401b4ee0197143da4e16c87ff7f541b2bf5b094fcc8e3443dfe"
},
"osx-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/macOS/StaticSitesClient",
"sha": "0412544daa8522aafeaa495e03fad3a6530b5e121959624de4c115f76018cae9"
}
}
},
{
"version": "stable",
"buildId": "694f9b1be52be00b1b4cde5deb5bb4994154f9b6",
"publishDate": "2025-07-21T07:21:52.0658686Z",
"files": {
"linux-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/linux/StaticSitesClient",
"sha": "3fdeaa74fff3e8136fa95f994761559b48900f094214dc81c98f825de506a398"
},
"win-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/windows/StaticSitesClient.exe",
"sha": "f55f0efd65b1b401b4ee0197143da4e16c87ff7f541b2bf5b094fcc8e3443dfe"
},
"osx-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/macOS/StaticSitesClient",
"sha": "0412544daa8522aafeaa495e03fad3a6530b5e121959624de4c115f76018cae9"
}
}
},
{
"version": "backup",
"buildId": "53b7d0e07fe5c34bf68929fab92f87ce910288dc",
"publishDate": "2024-10-24T20:43:23.5850191Z",
"files": {
"linux-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/53b7d0e07fe5c34bf68929fab92f87ce910288dc/linux/StaticSitesClient",
"sha": "66fca4b42cbc64d451097931ca4ed75649233bd818f97f0c3f6d1d75cff61413"
},
"win-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/53b7d0e07fe5c34bf68929fab92f87ce910288dc/windows/StaticSitesClient.exe",
"sha": "fc949fb19d29cce1e8b74cf1e2c31706426d46b3e03d830d601524cee63faa0b"
},
"osx-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/53b7d0e07fe5c34bf68929fab92f87ce910288dc/macOS/StaticSitesClient",
"sha": "89ec4fe61217325e89ed849a564ffe4cc51b61c325abdca82e8e441a4959ec92"
}
}
}
]
Release Metadata for stable: {
"version": "stable",
"buildId": "694f9b1be52be00b1b4cde5deb5bb4994154f9b6",
"publishDate": "2025-07-21T07:21:52.0658686Z",
"files": {
"linux-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/linux/StaticSitesClient",
"sha": "3fdeaa74fff3e8136fa95f994761559b48900f094214dc81c98f825de506a398"
},
"win-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/windows/StaticSitesClient.exe",
"sha": "f55f0efd65b1b401b4ee0197143da4e16c87ff7f541b2bf5b094fcc8e3443dfe"
},
"osx-x64": {
"url": "https://swalocaldeployv2-bndtgugjgqc3dhdx.b01.azurefd.net/downloads/694f9b1be52be00b1b4cde5deb5bb4994154f9b6/macOS/StaticSitesClient",
"sha": "0412544daa8522aafeaa495e03fad3a6530b5e121959624de4c115f76018cae9"
}
}
}
Local client binary is up to date. Skipping download.
Deploying using C:\Users\<me>\.swa\deploy\694f9b1be52be00b1b4cde5deb5bb4994154f9b6\StaticSitesClient.exe@694f9b1be52be00b1b4cde5deb5bb4994154f9b6
Deploying using the following options:
- env:
- SWA_CLI_DEBUG: silly
- SWA_RUNTIME_WORKFLOW_LOCATION: C:\urban-tribble\.github\workflows\azure-static-web-apps-zealous-smoke-0ba00241e.yml
- SWA_RUNTIME_CONFIG_LOCATION: C:\urban-tribble\Client
- SWA_RUNTIME_CONFIG: C:\urban-tribble\Client\staticwebapp.config.json
- SWA_CLI_VERSION: 2.0.7
- SWA_CLI_DEPLOY_DRY_RUN: false
- SWA_CLI_DEPLOY_BINARY: C:\Users\me\.swa\deploy\694f9b1be52be00b1b4cde5deb5bb4994154f9b6\StaticSitesClient.exe@694f9b1be52be00b1b4cde5deb5bb4994154f9b6
- DEPLOYMENT_ACTION: upload
- DEPLOYMENT_PROVIDER: SwaCli
- REPOSITORY_BASE: C:\urban-tribble
- SKIP_APP_BUILD: true
- SKIP_API_BUILD: true
- DEPLOYMENT_TOKEN: <hidden>
- APP_LOCATION: C:\urban-tribble\bin\publish\wwwroot
- API_LOCATION: C:\urban-tribble\Api
- DATA_API_LOCATION: <undefined>
- CONFIG_FILE_LOCATION: C:\urban-tribble\Client
- VERBOSE: true
- FUNCTION_LANGUAGE: dotnetisolated
- FUNCTION_LANGUAGE_VERSION: 8.0
ℹ DeploymentId: 88fd8ffa-20fe-4740-bafd-ff91b5aab79a
ℹ Verbose logging enabled
ℹ Try to validate location at: 'C:\urban-tribble\C:\urban-tribble\bin\publish\wwwroot'.
ℹ Build timeout not specified, defaulting to 15 minutes
ℹ App Directory Location: 'C:\urban-tribble\bin\publish\wwwroot' was found.
ℹ Try to validate location at: 'C:\urban-tribble\swa-db-connections'.
ℹ Try to validate location at: 'C:\urban-tribble\C:\urban-tribble\Client\staticwebapp.config.json'.
ℹ config_file_location: config file 'C:\urban-tribble\Client\staticwebapp.config.json' was found.
ℹ Looking for event info
ℹ Could not get event info. Proceeding
ℹ Skipping step to build C:\urban-tribble\bin\publish\wwwroot with Oryx
ℹ Didn't find Oryx manifest file under location: C:\urban-tribble\88fd8ffa-20fe-4740-bafd-ff91b5aab79a-swa-oryx\app-manifest\oryx-manifest.toml
ℹ Determined default file to be: index.html
ℹ Using 'staticwebapp.config.json' file for configuration information, 'routes.json' will be ignored.
ℹ Calculating the size of app artifacts: 15387552 B
ℹ Try to validate location at: 'C:\urban-tribble\C:\urban-tribble\Api'.
ℹ Api Directory Location: 'C:\urban-tribble\Api' was found.
ℹ Skipping step to build C:\urban-tribble\Api with Oryx
ℹ Function Runtime Information. OS: windows, Functions Runtime: ~4, dotnetisolated version: 8.0
ℹ Zipping Api Artifacts
ℹ Api Zip will be created from directory: C:\urban-tribble\Api
ℹ Api Content Hash: 5f16934ab5e6a492191ce414877d0dea
ℹ No node_modules folder found.
ℹ Done Zipping Api Artifacts
ℹ Zipping App Artifacts
ℹ App Zip will be created from directory: C:\urban-tribble\bin\publish\wwwroot
ℹ Done Zipping App Artifacts
ℹ Uploading build artifacts.
ℹ Skipping function upload as functions are identical to last successful deployment.
ℹ Finished Upload. Polling on deployment.
ℹ Status: InProgress. Time: 0.3005953(s)
ℹ Status: Succeeded. Time: 15.5726991(s)
ℹ Deployment Complete :)
ℹ Thanks for using Azure Static Web Apps!
✔ Project deployed to https://polite-ocean-077f4ff1e.3.azurestaticapps.net 🚀
Metadata
Metadata
Assignees
Labels
No labels