I have a Static Web App. In the yml workflow file I have a deployment token designated. That token is listed under Actions > Repository secrets. You can see the name in the output below. Every time I try to run the build I get this output. I turned on debugging for more detail:
Deploy to Azure Static Web Apps
##[debug]Evaluating condition for step: 'Deploy to Azure Static Web Apps'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Deploy to Azure Static Web Apps
##[debug]Loading inputs
##[debug]Evaluating: secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_LEMON_OCEAN_06552EA1E
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'AZURE_STATIC_WEB_APPS_API_TOKEN_LEMON_OCEAN_06552EA1E'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run Azure/static-web-apps-deploy@v1
/usr/bin/docker run --name b0d864c6d8af660343ec8a7fec40ea7411c8_7f3a33 --label 89b0d8 --workdir /github/workspace --rm -e "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN" -e "INPUT_ACTION" -e "INPUT_APP_LOCATION" -e "INPUT_SKIP_APP_BUILD" -e "INPUT_APP_ARTIFACT_LOCATION" -e "INPUT_API_LOCATION" -e "INPUT_PRODUCTION_BRANCH" -e "INPUT_API_BUILD_COMMAND" -e "INPUT_OUTPUT_LOCATION" -e "INPUT_APP_BUILD_COMMAND" -e "INPUT_REPO_TOKEN" -e "INPUT_ROUTES_LOCATION" -e "INPUT_CONFIG_FILE_LOCATION" -e "INPUT_SKIP_API_BUILD" -e "INPUT_DEPLOYMENT_ENVIRONMENT" -e "INPUT_IS_STATIC_EXPORT" -e "INPUT_DATA_API_LOCATION" -e "INPUT_GITHUB_ID_TOKEN" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_DEBUG" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/site-main-09292025/site-main-09292025":"/github/workspace" 89b0d8:64c6d8af660343ec8a7fec40ea7411c8
DeploymentId: d4681700-15f0-4aed-beda-2152d48d3ee7
Try to validate location at: '/github/workspace'.
App Directory Location: '/' was found.
Try to validate location at: '/github/workspace/swa-db-connections'.
Looking for event info
The content server has rejected the request with: BadRequest
Reason: No matching Static Web App was found or the api key was invalid.
For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Deploy to Azure Static Web Apps
I tried reset the Deployment Token in Azure under the SWA a number of times and updating it in github. Azure refuses to accept it. The debug output shows it sees the token and can read it. Yet Azure insists it doesn't match or is invalid. Of course it won't say which.
I have only one resource that is a SWA. So there is no confusion over whether I'm using the right one.
Anyone have any idea why?