Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reason: No matching Static Web App was found or the api key was invalid #1576

Open
nadeem1990 opened this issue Nov 10, 2024 · 2 comments
Open

Comments

@nadeem1990
Copy link

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.

@nadeem1990
Copy link
Author

nadeem1990 commented Nov 10, 2024

I have a php file in my folder which is being used to sent email, I have deleted that PHP file itself, then also getting same issue.

@Kurayami7
Copy link

I am now stuck with the same issue. Has someone managed to find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants