I have the code for a static webapp in a github repository. The code is being deployed via github actions.
When I deploy to a development environment using the github actions from the development branch, this works as expected.
When I deploy from the master branch, with
jobs:
build_and_deploy_prod_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'workflow_dispatch'
runs-on: [self-hosted,docker]
name: Build and Deploy Prod Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build And Deploy Prod
id: builddeployprod
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
production_branch: "master"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "/api" # Api source code path - optional
output_location: "build" # Built app content directory - optional
###### End of Repository/Build Configurations ######
in the workflow file, I always get the error
Deployment Failed :(
Deployment Failure Reason: Failed to deploy the Azure Functions.
There are no differences between the 2 repositories, so I guess there must be something static-web-app related to the failure and not code related.
Thanks for helping me troubleshoot this issue.
Kind regards
Hannes