Skip to content

Commit f36c222

Browse files
committed
Refresh
1 parent f020dfb commit f36c222

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

articles/static-web-apps/deploy-nextjs.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
---
2-
title: "Tutorial: Deploy static-rendered Next.js websites on Azure Static Web Apps"
2+
title: "Deploy static-rendered Next.js websites on Azure Static Web Apps"
33
description: "Generate and deploy Next.js dynamic sites with Azure Static Web Apps."
44
services: static-web-apps
55
author: craigshoemaker
66
ms.service: static-web-apps
77
ms.topic: tutorial
8-
ms.date: 03/26/2022
8+
ms.date: 10/11/2022
99
ms.author: cshoe
10-
ms.custom: devx-track-js
10+
ms.custom: devx-track-js, engagement-fy23
1111
---
1212

13-
1413
# Deploy static-rendered Next.js websites on Azure Static Web Apps
1514

16-
In this tutorial, you learn to deploy a [Next.js](https://nextjs.org) generated static website to [Azure Static Web Apps](overview.md). For more information about Next.js specifics, see the [starter template's readme](https://github.com/staticwebdev/nextjs-starter#readme).
15+
In this tutorial, learn to deploy a [Next.js](https://nextjs.org) generated static website to [Azure Static Web Apps](overview.md). For more information about Next.js specifics, see the [starter template readme](https://github.com/staticwebdev/nextjs-starter#readme).
1716

1817
## Prerequisites
1918

@@ -23,37 +22,37 @@ In this tutorial, you learn to deploy a [Next.js](https://nextjs.org) generated
2322

2423
## Set up a Next.js app
2524

26-
Rather than using the Next.js CLI to create your app, you can use a starter repository. The starter repository contains an existing Next.js application that supports dynamic routes.
25+
Rather than using the Next.js CLI to create your app, you can use a starter repository. The starter repository contains an existing Next.js app that supports dynamic routes.
2726

2827
To begin, create a new repository under your GitHub account from a template repository.
2928

30-
1. Navigate to [https://github.com/staticwebdev/nextjs-starter/generate](https://github.com/login?return_to=/staticwebdev/nextjs-starter/generate)
31-
1. Name the repository **nextjs-starter**
32-
1. Next, clone the new repo to your machine. Make sure to replace `<YOUR_GITHUB_ACCOUNT_NAME>` with your account name.
29+
1. Go to [https://github.com/staticwebdev/nextjs-starter/generate](https://github.com/login?return_to=/staticwebdev/nextjs-starter/generate).
30+
2. Name the repository **nextjs-starter**.
31+
3. Clone the new repo to your machine. Make sure to replace `<YOUR_GITHUB_ACCOUNT_NAME>` with your account name.
3332

3433
```bash
3534
git clone http://github.com/<YOUR_GITHUB_ACCOUNT_NAME>/nextjs-starter
3635
```
3736

38-
1. Navigate to the newly cloned Next.js app:
37+
4. Go to the newly cloned Next.js app.
3938

4039
```bash
4140
cd nextjs-starter
4241
```
4342

44-
1. Install dependencies:
43+
5. Install dependencies.
4544

4645
```bash
4746
npm install
4847
```
4948

50-
1. Start Next.js app in development:
49+
6. Start Next.js app in development.
5150

5251
```bash
5352
npm run dev
5453
```
5554

56-
Navigate to `http://localhost:3000` to open the app, where you should see the following website open in your preferred browser:
55+
7. Go to `http://localhost:3000` to open the app, where you should see the following website open in your preferred browser.
5756

5857
:::image type="content" source="media/deploy-nextjs/start-nextjs-app.png" alt-text="Start Next.js app":::
5958

@@ -67,10 +66,10 @@ The following steps show how to link your app to Azure Static Web Apps. Once in
6766

6867
### Create a static app
6968

70-
1. Navigate to the [Azure portal](https://portal.azure.com).
69+
1. Go to the [Azure portal](https://portal.azure.com).
7170
1. Select **Create a Resource**.
7271
1. Search for **Static Web Apps**.
73-
1. Select **Static Web Apps**.
72+
1. Select **Static Web App**.
7473
1. Select **Create**.
7574
1. On the _Basics_ tab, enter the following values.
7675

@@ -83,7 +82,7 @@ The following steps show how to link your app to Azure Static Web Apps. Once in
8382
| _Region for Azure Functions API and staging environments_ | Select a region closest to you. |
8483
| _Source_ | **GitHub** |
8584

86-
1. Select **Sign in with GitHub** and authenticate with GitHub.
85+
1. Select **Sign in with GitHub** and authenticate with GitHub, if prompted.
8786

8887
1. Enter the following GitHub values.
8988

@@ -109,11 +108,11 @@ The following steps show how to link your app to Azure Static Web Apps. Once in
109108

110109
1. Once the deployment completes select, **Go to resource**.
111110

112-
1. On the _Overview_ window, select the *URL* link to open your deployed application.
111+
2. On the _Overview_ window, select the *URL* link to open your deployed app.
113112

114113
If the website doesn't load immediately, then the build is still running. Once the workflow is complete, you can refresh the browser to view your web app.
115114
116-
To check the status of the Actions workflow, navigate to the Actions dashboard for your repository:
115+
To check the status of the Actions workflow, go to the *Actions* dashboard for your repository:
117116
118117
```url
119118
https://github.com/<YOUR_GITHUB_USERNAME>/nextjs-starter/actions
@@ -129,13 +128,15 @@ Return to the terminal and run the following command `git pull origin main`.
129128
130129
## Clean up resources
131130
132-
If you're not going to continue to use this application, you can delete the Azure Static Web Apps instance through the following steps:
131+
If you're not going to continue to use this app, you can delete the Azure Static Web Apps instance through the following steps.
133132

134133
1. Open the [Azure portal](https://portal.azure.com).
135-
1. Search for **my-nextjs-group** from the top search bar.
136-
1. Select on the group name.
137-
1. Select on the **Delete** button.
138-
1. Select **Yes** to confirm the delete action.
134+
2. Search for **my-nextjs-group** from the top search bar.
135+
3. Select on the group name.
136+
4. Select on the **Delete** button.
137+
5. Select **Yes** to confirm the delete action.
138+
139+
## Next steps
139140

140141
> [!div class="nextstepaction"]
141142
> [Set up a custom domain](custom-domain.md)

0 commit comments

Comments
 (0)