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-web-apps/apis.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,16 +20,7 @@ Azure Static Web Apps provides serverless API endpoints via [Azure Functions](..
20
20
21
21
## Configuration
22
22
23
-
API endpoints are available to the web app through the _api_ route. While this route is fixed, you have control over the folder where you locate the associated Azure Functions app. You can change this location by editing the workflow YAML file located in your repository's _.github/workflows_ folder.
24
-
25
-
Set the the following location's value to the desired folder location for the API app in your repository.
26
-
27
-
```schema
28
-
jobs
29
-
└── steps
30
-
└── with
31
-
└── api_location
32
-
```
23
+
API endpoints are available to the web app through the _api_ route. While this route is fixed, you have control over the folder where you locate the associated Azure Functions app. You can change this location by [editing the workflow YAML file](github-actions-workflow.md#build-and-deploy) located in your repository's _.github/workflows_ folder.
33
24
34
25
## Constraints
35
26
@@ -38,6 +29,7 @@ Azure Static Web Apps provides an API through Azure Functions. The capabilities
38
29
- The API route prefix is must be _api_.
39
30
- Triggers and bindings are limited to [HTTP](../azure-functions/functions-bindings-http-webhook.md).
40
31
- All other [Azure Functions triggers and bindings](../azure-functions/functions-triggers-bindings.md#supported-bindings) except for output bindings are restricted.
32
+
- Logs are only available if you add [Application Insights](../azure-functions/functions-monitoring.md) to your Functions app.
Copy file name to clipboardExpand all lines: articles/static-web-apps/github-actions-workflow.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ The `repo_token`, `action`, and `azure_static_web_apps_api_token` values are set
139
139
140
140
## Customizations
141
141
142
-
There are few additional configuration settings available that are not generated in the workflow file by default.
142
+
There are few additional configuration settings available that are not generated in the workflow file by default. The following customizations can be defined under a job's `with` section.
143
143
144
144
### Custom build commands
145
145
@@ -149,7 +149,7 @@ The deployment always calls `npm install` before any custom command.
149
149
150
150
| Command | Description |
151
151
|---------------------|-------------|
152
-
| `app_build_command` | Defines a custom command to run during deployment of the static content application.<br><br>For example, to configure a production build for an Angular application enter `ng build -prod`. |
152
+
| `app_build_command` | Defines a custom command to run during deployment of the static content application.<br><br>For example, to configure a production build for an Angular application enter `ng build -prod`. If left blank, the workflow tries to run the `build` or `build:Azure` commands. |
153
153
| `api_build_command` | Defines a custom command to run during deployment of the Azure Functions API application. |
Copy file name to clipboardExpand all lines: articles/static-web-apps/review-publish-pull-requests.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,22 @@ ms.author: yolasors
13
13
14
14
This article demonstrates how to use pre-production environments to review changes to applications deployed with [Azure Static Web Apps](overview.md).
15
15
16
-
17
-
A pre-production (staging) environment is a fully-functional staged version of your application that includes changes not available in production.
16
+
A pre-production (staging) environment is a fully-functional staged version of your application that includes changes not available in production.
18
17
19
18
Azure Static Web Apps generates a GitHub Actions workflow in the repository. When a a pull request is created against a branch that the workflow watches, the pre-production environment is built. The pre-production environment stages the app, enables you to perform reviews before pushing to production.
20
19
21
20
Multiple pre-production environments can co-exist at the same time when using Azure Static Web Apps. Each time you create a pull request against the watched branch, a staged version with your changes is deployed to a distinct pre-production environment.
22
21
23
22
There are many benefits of using pre-production environments. For example, you can:
24
-
- Review visual changes between production and staging - for example, updates to content and layout
25
-
- Demonstrate the changes to your team
26
-
- Compare different versions of your application
27
-
- Validate changes using acceptance tests
28
-
- Perform sanity checks before deploying to production
23
+
24
+
- Review visual changes between production and staging. For example, viewing updates to content and layout.
25
+
- Demonstrate the changes to your team.
26
+
- Compare different versions of your application.
27
+
- Validate changes using acceptance tests.
28
+
- Perform sanity checks before deploying to production.
29
+
30
+
> [!NOTE]
31
+
> During preview, a [maximum of only one staging environment](quotas.md) is allowed at a time.
29
32
30
33
## Prerequisites
31
34
@@ -42,7 +45,7 @@ Begin by making a change in your repository. You can do it directly on GitHub as
42
45
Type a branch name and click on **Create branch**.
43
46
44
47
1. Go to your _app_ folder and change some text content. For example, you can change a title or paragraph. Once you found the file you want to edit, click on **Edit** to make the change.
45
-
48
+
46
49
:::image type="content" source="./media/review-publish-pull-requests/edit-file.png" alt-text="Edit file button in GitHub interface":::
47
50
48
51
1. After you make the changes, click on **Commit changes** to commit your changes to the branch.
@@ -54,18 +57,20 @@ Begin by making a change in your repository. You can do it directly on GitHub as
54
57
Next, create a pull request from this change.
55
58
56
59
1. Open the **Pull request** tab of your project on GitHub:
60
+
57
61
:::image type="content" source="./media/review-publish-pull-requests/tab.png" alt-text="Pull request tab in a GitHub repository":::
58
62
59
63
1. Click on the **Compare & pull request** button of your branch.
60
64
61
65
1. You can optionally fill-in some details about your changes, then click on **Create pull request**.
66
+
62
67
:::image type="content" source="./media/review-publish-pull-requests/open.png" alt-text="Pull request creation in GitHub":::
63
68
64
69
You can assign reviewers and add comments to discuss your changes if needed.
65
70
66
71
> [!NOTE]
67
72
> You can make multiple changes by pushing new commits to your branch. The pull request is then automatically updated to reflect all changes.
68
-
73
+
69
74
## Review changes
70
75
71
76
After the pull request is created, the [GitHub Actions](https://github.com/features/actions) deployment workflow runs and deploys your changes to a pre-production environment.
@@ -80,7 +85,7 @@ If you take a closer look at the URL, you can see that it's composed like this:
80
85
81
86
For a given pull request, the URL remains the same even if you push new updates. In addition to the URL staying constant, the same pre-production environment is reused for the life of the pull request.
82
87
83
-
## Publish changes
88
+
## Publish changes
84
89
85
90
Once changes are approved, you can publish your changes to production by merging the pull request.
86
91
@@ -103,6 +108,5 @@ The number of pre-production environments available for each app deployed with S
Copy file name to clipboardExpand all lines: articles/static-web-apps/routes.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,9 @@ The following table lists the appropriate location to put your _routes.json_ fil
36
36
37
37
### Angular
38
38
39
-
Angular apps do not copy files in the _src_ folder to the artifact folder by default. Use the following steps to ensure the _routes.json_ is copied to the appropriate location.
39
+
Angular apps do not copy files in the _src_ folder to the artifact folder by default. You can point the GitHub Actions workflow directly to your _routes.json_ file via the [`routes_location` workflow customization](github-actions-workflow.md#route-file-location), or you can update the _angular.json_ file to copy the file.
40
+
41
+
Using the `routes_location` customization is preferred, but you can also use the following steps update the _angular.json_ file.
40
42
41
43
1. In Visual Studio Code, open the _angular.json_ file
0 commit comments