Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
331 stars 57 forks source link

Deploying the API succeds on build, but no API is presented in Azure? #1570

Open MrHinsh opened 3 weeks ago

MrHinsh commented 3 weeks ago

I'm having a problem with the API deployment and I don't see any error messages. It looks like its deploying the API, but in the APIs tab does not show any active APIs.

Image

Why might this be the case? What else can I look at to debug?


staticwebapp.config.json: https://github.com/nkdAgility/NKDAgility.com/blob/main/staticwebapp.config.json

{
  "platform": {
    "apiRuntime": "dotnet-isolated:8.0"
  }
}

Build: https://github.com/nkdAgility/NKDAgility.com/blob/main/.github/workflows/main.yaml

- name: Build and Deploy
        uses: Azure/static-web-apps-deploy@v1
        id: azureDeploy
        env:
          VERBOSE: true
        with:
          repo_token: ${{ steps.app-token.outputs.token }}
          action: "upload"
          app_location: ./_site
          api_location: ./_api
          skip_app_build: true
          skip_api_build: true
          output_location: ""
          deployment_environment: ${{ (needs.Setup.outputs.nkdAgility_AzureSitesEnvironment) }}
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}

Log: https://github.com/nkdAgility/NKDAgility.com/actions/runs/11594635655/job/32281460532

Verbose logging enabled
Try to validate location at: '/github/workspace/./_site'.
Build timeout not specified, defaulting to 15 minutes
App Directory Location: './_site' was found.
Try to validate location at: '/github/workspace/swa-db-connections'.
Looking for event info
Event info parsed from GitHub event json.
Skipping step to build /github/workspace/./_site with Oryx
Found staticwebapp.config.json file: '_site/staticwebapp.config.json'
Didn't find Oryx manifest file under location: /bin/staticsites/e47c04cd-260e-4fbf-86ed-29ba95663724-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: 409548339 B
Try to validate location at: '/github/workspace/./_api'.
Api Directory Location: './_api' was found.
Skipping step to build /github/workspace/./_api with Oryx
Function Runtime Information. OS: windows, Functions Runtime: ~4, dotnetisolated version: 8.0
Found functions.metadata file
Zipping Api Artifacts
Api Zip will be created from directory: /github/workspace/./_api
Api Content Hash: 4ea5b8d7[19](https://github.com/nkdAgility/NKDAgility.com/actions/runs/11594635655/job/32281460532#step:7:20)77aadda19207122664a342
Done Zipping Api Artifacts
Zipping App Artifacts
App Zip will be created from directory: /github/workspace/./_site
Done Zipping App Artifacts
Uploading build artifacts.
Finished Upload. Polling on deployment.
Status: InProgress. Time: 0.1541086(s)
Status: InProgress. Time: 15.3149439(s)
Status: Succeeded. Time: 30.4664566(s)
Deployment Complete :)
Visit your site at: https://yellow-pond-042d21b03-68.westeurope.5.azurestaticapps.net/
Thanks for using Azure Static Web Apps!
Exiting
MrHinsh commented 2 weeks ago

This is an unmonitored / rarely monitoed location! Get faster answers https://learn.microsoft.com/en-us/answers/tags/448/static-web-apps