Azure / Azure/static-web-apps

Build failed becuase github actions or azure static web apps cant find the output directory, or something is wrong with the outpot directory

Open
#894 4 comments 0 reactions 0 assignees View on GitHub
oryx
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Followed offical tutorial for deploying webapps to azure
error
![image](https://user-images.githubusercontent.com/21322737/185912709-e9694381-f573-4862-abb8-9f298e11495c.png)
__FILE__ github_actions.yml
```yml
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_GROUND_0EE4ED70F }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### 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: "/angular-app" # App source code path
# api_location: "api" # Api source code path - optional
output_location: "/angular-app/dist/angular-app" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_GROUND_0EE4ED70F }}
action: "close"

```

__FILE staticwebapp.config.json __

```json
{
"navigationFallback": {
"rewrite": "/index.html",
"exclude": ["*.{css,scss,js,png,gif,ico,jpg,svg}"]
}
}

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.