Skip to content

Commit e31a390

Browse files
Merge pull request #205077 from sonalivdeshpande/update-static-web-app-article
[Static Web App] Update static web app article with new VS Code workflow
2 parents 544502d + 0763ba6 commit e31a390

File tree

6 files changed

+70
-29
lines changed

6 files changed

+70
-29
lines changed

articles/azure-fluid-relay/how-tos/deploy-fluid-static-web-apps.md

Lines changed: 70 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ title: 'How to: Deploy Fluid applications using Azure Static Web Apps'
33
description: Detailed explanation about how Fluid applications can be hosted on Azure Static Web Apps
44
author: sonalivdeshpande
55
ms.author: sdeshpande
6-
ms.date: 08/19/2021
6+
ms.date: 07/18/2022
77
ms.topic: article
88
ms.service: azure-fluid
99
---
1010

1111
# How to: Deploy Fluid applications using Azure Static Web Apps
1212

13-
This article demonstrates how to deploy Fluid apps using Azure Static Web Apps. The [FluidHelloWorld](https://github.com/microsoft/FluidHelloWorld/tree/main-azure) repository contains a Fluid application called **DiceRoller** that enables all connected clients to roll a dice and view the result. In this how-to, you deploy the DiceRoller application to Azure Static Web Apps using the Visual Studio Code extension.
13+
This article demonstrates how to deploy Fluid apps using Azure Static Web Apps. The [FluidHelloWorld](https://github.com/microsoft/FluidHelloWorld/tree/main-azure) repository contains a Fluid application called **DiceRoller** that enables all connected clients to roll a die and view the result. In this how-to, you deploy the DiceRoller application to Azure Static Web Apps using the Visual Studio Code extension.
1414

1515
If you don't have an Azure subscription, [create a free trial account](https://azure.microsoft.com/free).
1616

@@ -55,7 +55,7 @@ In order to use this token provider, you need to deploy an HTTPS endpoint that w
5555

5656
### Deploying an Azure Function using Azure Static Web apps
5757

58-
Azure Static Web Apps allow you to develop a full-stack web site without needing to deal with the server-side configuration of an entire web hosting environment. You can deploy Azure Functions alongside your static website. Using this capability, you can deploy an HTTP-triggered Azure Function that will sign tokens.
58+
Azure Static Web Apps allows you to develop a full-stack web site without needing to deal with the server-side configuration of an entire web hosting environment. You can deploy Azure Functions alongside your static website. Using this capability, you can deploy an HTTP-triggered Azure Function that will sign tokens.
5959

6060
For more information about deploying Azure Function-powered APIs to your static web app see [Add an API to Azure Static Web Apps with Azure Functions](../../static-web-apps/add-api.md).
6161

@@ -89,57 +89,98 @@ Run the `npm run build` command from the root directory to rebuild the app. This
8989

9090
1. Inside Visual Studio Code, select the Azure logo in the Activity Bar to open the Azure extensions window.
9191

92-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-azure-logo.png" alt-text="An image of the Azure Logo on a white background.":::
92+
:::image type="content" source="../images/extension-azure-logo.png" alt-text="An image of the Azure Logo on a white background.":::
9393

9494
> [!NOTE]
9595
> You must sign in to Azure and GitHub in Visual Studio Code to continue. If you are not already authenticated, the extension will prompt you to sign in to both services during the creation process.
9696
97-
1. Under the *Static Web Apps* label, select the **plus sign**.
97+
1. Select <kbd>F1</kbd> to open the Visual Studio Code command palette.
9898

99-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-create-button.png" alt-text="An image of the Static Web Apps extension UI, highlighting the create button.":::
100-
101-
> [!NOTE]
102-
> The Azure Static Web Apps Visual Studio Code extension streamlines the creating process by using a series of default values. If you want to have fine-grained control of the creation process, open the command palate and select **Azure Static Web Apps: Create Static Web App... (Advanced)**.
99+
1. Enter **Create static web app** in the command box.
103100

104-
1. The command palette opens at the top of the editor and prompts you to select a subscription name.
101+
1. Select *Azure Static Web Apps: Create static web app...* and select **Enter**.
105102

106-
Select your subscription and press <kbd>Enter</kbd>.
103+
# [No Framework](#tab/vanilla-javascript)
107104

108-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-subscription.png" alt-text="An image of the Azure subscription selection UI, which shows a single subscription to be selected.":::
105+
| Setting | Value |
106+
| --- | --- |
107+
| Name | Enter **my-first-static-web-app** |
108+
| Region | Select the region closest to you. |
109+
| Build preset | Select **Custom**. |
109110

110-
1. Next, name your application.
111+
# [Angular](#tab/angular)
111112

112-
Type **my-first-static-web-app** and press <kbd>Enter</kbd>.
113+
| Setting | Value |
114+
| --- | --- |
115+
| Name | Enter **my-first-static-web-app** |
116+
| Region | Select the region closest to you. |
117+
| Build preset | Select **Custom**. |
113118

114-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-create-app.png" alt-text="An image of the Static Web Apps extension UI, which shows a text box to enter the name of the application.":::
119+
# [React](#tab/react)
115120

116-
1. Select a region close to you.
121+
| Setting | Value |
122+
| --- | --- |
123+
| Name | Enter **my-first-static-web-app** |
124+
| Region | Select the region closest to you. |
125+
| Build preset | Select **Custom**. |
117126

118-
> [!NOTE]
119-
> Azure Static Web Apps globally distributes your static assets. The region you select determines where your
120-
> optional staging environments and API function app will be located.
127+
# [Vue](#tab/vue)
128+
129+
| Setting | Value |
130+
| --- | --- |
131+
| Name | Enter **my-first-static-web-app** |
132+
| Region | Select the region closest to you. |
133+
| Build preset | Select **Custom**. |
134+
135+
---
136+
137+
1. Enter the settings values for that match your framework preset choice.
138+
139+
# [No Framework](#tab/vanilla-javascript)
140+
141+
| Setting | Value |
142+
| --- | --- |
143+
| Location of application code | Enter **/src** |
144+
| Location of Azure Function code | **api** |
145+
146+
# [Angular](#tab/angular)
147+
148+
| Setting | Value |
149+
| --- | --- |
150+
| Location of application code | Enter **/** |
151+
| Location of Azure Function code | **api** |
152+
153+
# [React](#tab/react)
154+
155+
| Setting | Value |
156+
| --- | --- |
157+
| Location of application code | Enter **/** |
158+
| Location of Azure Function code | **api** |
159+
160+
# [Vue](#tab/vue)
161+
162+
| Setting | Value |
163+
| --- | --- |
164+
| Location of application code | Enter **/** |
165+
| Location of Azure Function code | **api** |
121166

122-
1. Set other deployment options.
123-
124-
- When asked to select a build preset to configure default project structure, select **Custom**.
125-
- Location of application code: `/`
126-
- Location of Azure Function code: `api`
167+
---
127168

128169
1. Once the app is created, a confirmation notification is shown in Visual Studio Code.
129170

130-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-confirmation.png" alt-text="An image of the notification shown in Visual Studio Code when the app is created. The notification reads: Successfully created new static web app my-first-static-web-app. GitHub Actions is building and deploying your app, it will be available once the deployment completes.":::
171+
:::image type="content" source="../images/extension-confirmation.png" alt-text="An image of the notification shown in Visual Studio Code when the app is created. The notification reads: Successfully created new static web app my-first-static-web-app. GitHub Actions is building and deploying your app, it will be available once the deployment completes.":::
131172

132173
As the deployment is in progress, the Visual Studio Code extension reports the build status to you.
133174

134-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-waiting-for-deployment.png" alt-text="An image of the Static Web Apps extension UI, which shows a list of static web apps under each subscription. The highlighted static web app has a status of Waiting for Deployment displayed next to it.":::
175+
:::image type="content" source="../images/extension-waiting-for-deployment.png" alt-text="An image of the Static Web Apps extension UI, which shows a list of static web apps under each subscription. The highlighted static web app has a status of Waiting for Deployment displayed next to it.":::
135176

136177
Once the deployment is complete, you can navigate directly to your website.
137178

138179
1. To view the website in the browser, right-click on the project in the Static Web Apps extension, and select **Browse Site**.
139180

140-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-browse-site.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Browse Site option is highlighted.":::
181+
:::image type="content" source="../images/extension-browse-site.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Browse Site option is highlighted.":::
141182

142-
1. The location of your application code, Azure Function, and build output is part of the `azure-static-web-apps-xxx-xxx-xxx.yml` workflow file located in the `/.github/workflows` directory. This file is automatically created when create the Static Web app. It defines a GitHub Actions to build and deploy your Static Web app.
183+
2. The location of your application code, Azure Function, and build output is part of the `azure-static-web-apps-xxx-xxx-xxx.yml` workflow file located in the `/.github/workflows` directory. This file is automatically created when you create the Static Web app. It defines a GitHub Actions to build and deploy your Static Web app.
143184

144185

145186
## Clean up resources
@@ -148,4 +189,4 @@ If you're not going to continue to use this application, you can delete the Azur
148189

149190
In the Visual Studio Code Explorer window, return to the _Static Web Apps_ section and right-click on **my-first-static-web-app** and select **Delete**.
150191

151-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-delete.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Delete option is highlighted.":::
192+
:::image type="content" source="../images/extension-delete.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Delete option is highlighted.":::
1.32 KB
Loading
32.7 KB
Loading
17.9 KB
Loading
8.1 KB
Loading
25.4 KB
Loading

0 commit comments

Comments
 (0)