You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/static-apps/github-actions-workflow.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Setup GitHub Actions workflows for Azure Static Web Apps
2
+
title: GitHub Actions workflows for Azure Static Web Apps
3
3
description: Learn how to use GitHub repositories to set up continuous deployment to Azure Static Web Apps.
4
4
services: static-web-apps
5
5
author: christiannwamba
@@ -8,9 +8,10 @@ ms.topic: conceptual
8
8
ms.date: 05/08/2020
9
9
ms.author: chnwamba
10
10
---
11
-
# Setup GitHub Actions workflows for Azure Static Web Apps
12
11
13
-
When you create a new Azure Static Web App resource, Azure generates a GitHub Actions workflow to control the app's continuous deployment. The workflow is driven by YAML file. This article details the structure and options of the workflow file.
12
+
# GitHub Actions workflows for Azure Static Web Apps
13
+
14
+
When you create a new Azure Static Web App resource, Azure generates a GitHub Actions workflow to control the app's continuous deployment. The workflow is driven by a YAML file. This article details the structure and options of the workflow file.
14
15
15
16
Deployments are initiated by [triggers](#triggers), which run [jobs](#jobs) that are defined by individual [steps](#steps).
16
17
@@ -20,7 +21,7 @@ When you link your GitHub repository to Azure Static Web Apps, a workflow file i
20
21
21
22
Follow these steps to view the generated workflow file.
22
23
23
-
1. Open an the app's repository on GitHub.
24
+
1. Open the app's repository on GitHub.
24
25
1. From the _Code_ tab, click on the `.github/workflows` folder.
25
26
1. Click on the file with a name that looks like `azure-static-web-apps-<RANDOM_NAME>.yml`.
26
27
@@ -130,8 +131,8 @@ with:
130
131
131
132
| Property | Description | Required |
132
133
|---|---|---|
133
-
| `app_location` | Location of your application code.<br><br>For example, enter `/` if your application source code is at the root of the repository, or `/app` if you application code is in a directory called `app`. | Yes |
134
-
| `api_location` | Location of your Azure Functions code.<br><br>For example, enter `/api` if your app code is in a folder called `api`. | No |
134
+
| `app_location` | Location of your application code.<br><br>For example, enter `/` if your application source code is at the root of the repository, or `/app` if your application code is in a directory called `app`. | Yes |
135
+
| `api_location` | Location of your Azure Functions code.<br><br>For example, enter `/api` if your app code is in a folder called `api`. If no Azure Functions app is detected in the folder, the build doesn't fail, the workflow assumes you do not want an API. | No |
135
136
| `app_artifact_location` | Location of the build output directory relative to the `app_location`.<br><br>For example, if your application source code is located at `/app`, and the build script outputs files to the `/app/build` folder, then set `build` as the `app_artifact_location` value. | No |
136
137
137
138
The `repo_token`, `action`, and `azure_static_web_apps_api_token` values are set for you by Azure Static Web Apps shouldn't be manually changed.
@@ -153,7 +154,9 @@ The deployment always calls `npm install` before any custom command.
153
154
154
155
### Route file location
155
156
156
-
The `routes_location` property defines the location of the [routes.json](routes.md) file relative to the root of the repository.
157
+
You can customize the workflow to look for the [routes.json](routes.md) in any folder in your repository. The `routes_location` property defines the directory location where the _routes.json_ file is found. This location is relative to the root of the repository.
158
+
159
+
Being explicit about the location of your _routes.json_ file is particularly important if your front-end framework build step does not move this file to the `app_artifact_location` by default.
0 commit comments