1
00:00:03,000 --> 00:00:05,962
We configured Next.js to export

2
00:00:05,962 --> 00:00:08,637
our app as a static website.

3
00:00:08,733 --> 00:00:10,789
This way the build generates

4
00:00:10,789 --> 00:00:12,404
a folder called "out",

5
00:00:12,478 --> 00:00:16,780
that contains all the HTML and other static files.

6
00:00:16,780 --> 00:00:19,773
At this point we can take this folder,

7
00:00:19,773 --> 00:00:21,979
upload it to any web server,

8
00:00:22,057 --> 00:00:24,428
and we'll have a public website.

9
00:00:24,428 --> 00:00:27,282
You can either set up your own web server,

10
00:00:27,282 --> 00:00:29,520
or use one of the many hosting

11
00:00:29,520 --> 00:00:31,758
providers available out there.

12
00:00:31,832 --> 00:00:34,105
Just as an example, in this

13
00:00:34,105 --> 00:00:36,040
video I'll use Netlify,

14
00:00:36,124 --> 00:00:39,006
that's a platform with many features,

15
00:00:39,006 --> 00:00:40,407
a bit like Vercel,

16
00:00:40,485 --> 00:00:42,415
but among other things it lets

17
00:00:42,415 --> 00:00:43,830
you create a new site,

18
00:00:43,895 --> 00:00:46,995
simply by uploading some local files.

19
00:00:46,995 --> 00:00:48,878
If you sign in to Netlify,

20
00:00:48,878 --> 00:00:50,761
you'll have this dashboard

21
00:00:50,834 --> 00:00:53,032
where you can manage your sites.

22
00:00:53,032 --> 00:00:56,962
You can import a Git repository, just like Vercel.

23
00:00:56,962 --> 00:00:59,929
But there's also an option to deploy manually,

24
00:00:59,929 --> 00:01:03,028
by uploading a folder using drag and drop.

25
00:01:03,028 --> 00:01:04,760
So that's what I'll do now:

26
00:01:04,768 --> 00:01:08,104
literally take the "out" folder generated

27
00:01:08,104 --> 00:01:09,894
by the Next.js export,

28
00:01:09,976 --> 00:01:12,777
and drag it into the upload area.

29
00:01:12,777 --> 00:01:15,863
This will automatically create a new site.

30
00:01:15,863 --> 00:01:17,968
And the deployment succeeded!

31
00:01:17,968 --> 00:01:19,806
Let's close this popup,

32
00:01:19,806 --> 00:01:22,985
and on this page we see our project settings.

33
00:01:22,985 --> 00:01:25,814
It automatically generated a (rather

34
00:01:25,814 --> 00:01:27,778
weird) name for our site.

35
00:01:27,857 --> 00:01:31,195
We should be able to change it in "Site settings".

36
00:01:31,195 --> 00:01:34,157
There's a "Change site name" button here.

37
00:01:34,157 --> 00:01:36,128
Let's see if we can call it

38
00:01:36,128 --> 00:01:37,807
"next-reviews" instead.

39
00:01:37,880 --> 00:01:41,485
It will be under the "netlify.app" domain.

40
00:01:41,485 --> 00:01:43,086
That name was free.

41
00:01:43,086 --> 00:01:48,418
So our website is now at "next-reviews.netlify.app".

42
00:01:48,418 --> 00:01:50,433
Let's open that URL.

43
00:01:50,498 --> 00:01:53,076
And this is our static website,

44
00:01:53,076 --> 00:01:56,033
with all the pages working as expected.

45
00:01:56,033 --> 00:01:58,476
That's how easy it is to deploy

46
00:01:58,476 --> 00:02:00,447
a static site to Netlify.

47
00:02:00,525 --> 00:02:02,796
Now, of course in a real project

48
00:02:02,796 --> 00:02:05,527
you may want to set up a custom domain,

49
00:02:05,527 --> 00:02:07,788
rather than running it as a

50
00:02:07,788 --> 00:02:09,798
"netlify.app" subdomain.

51
00:02:09,882 --> 00:02:12,828
And you can do that by following step 2.

52
00:02:12,828 --> 00:02:15,431
But I'll stop here for this example.

53
00:02:15,431 --> 00:02:18,640
Once again, I used Netlify in this video

54
00:02:18,640 --> 00:02:21,243
but there are many other platforms where

55
00:02:21,243 --> 00:02:23,194
you can host a static website.

