Reason: No matching Static Web App was found or the api key was invalid
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Dear Team,
I have simple static web application with single html file along with some dependencies of css and js in assets folder, I have created a Azure static web app and selected my repository and given access to it, I have only 1 branch in my repo which is master, I have also updated the deployment token in my repository with same name and appropriate key, but still getting error like below which is a log of the workflow of my repo:
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.
-- below is the code of my workflow.yml file:
name: Build and Deploy to Azure Static Web Apps
on:
push:
branches:
- master # Your branch name
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: 'Build and Deploy Azure Static Web App'
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
app_location: "/" # Path to your app folder
api_location: "" # Leave empty if no API
output_location: "/" # Adjust as per your app structure
action: 'upload' # Required for static content
github_id_token: ${{ steps.idtoken.outputs.result }}
I have already tried with creation of new azure static web app and bind with the new repo and updated the details in yml file, but it always given same error, can anyone give recommendations to get rid of the issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.