1
00:00:02,150 --> 00:00:08,029
The next logical step would be to deploy the website and this time using Google MCI and not from our

2
00:00:08,029 --> 00:00:08,990
own computers.

3
00:00:11,340 --> 00:00:13,520
So for that, I'm going to define a new stage.

4
00:00:14,110 --> 00:00:15,480
I'm going to call this deeply.

5
00:00:22,540 --> 00:00:23,860
Deployed to search.

6
00:00:25,160 --> 00:00:31,010
I'm going to call it a job, but feel free to name it as you want, going to still use the note image

7
00:00:31,010 --> 00:00:34,250
and now I have quite a few jobs that use the same image.

8
00:00:34,670 --> 00:00:43,220
So what I can do right now is to take this out of here and put it right here on top so that by default,

9
00:00:43,220 --> 00:00:47,870
no will be used for old jobs and all the other jobs that have noad.

10
00:00:48,860 --> 00:00:50,170
I can simply remove it.

11
00:00:52,630 --> 00:00:55,060
And the other jobs will have it by default.

12
00:00:56,960 --> 00:00:59,480
So let's see how our script will look like.

13
00:01:02,130 --> 00:01:10,740
Now, this time, we will not be working with Gatsby anymore and actually only need to see a tool from

14
00:01:11,520 --> 00:01:11,940
search.

15
00:01:12,600 --> 00:01:15,480
So for that reason we don't have to do NPM install.

16
00:01:15,480 --> 00:01:17,510
We don't have to install Gatsby.

17
00:01:17,520 --> 00:01:22,560
Seelie, we only need to install such as H.

18
00:01:23,250 --> 00:01:28,980
So the comment to that is npm install, dash, dash, global search and that will be just enough to

19
00:01:28,980 --> 00:01:30,090
install search.

20
00:01:31,030 --> 00:01:34,290
Now we have installed search so we can call search.

21
00:01:35,970 --> 00:01:44,460
They will need to specify our project dash dash project and this needs to be the path to our project.

22
00:01:44,470 --> 00:01:49,140
So I'm going to say dot slash public because we are already inside.

23
00:01:50,300 --> 00:01:56,360
The folder that contains the public folder and we only need to reference it, and now we need to specify

24
00:01:56,360 --> 00:01:57,240
a domain as well.

25
00:01:57,350 --> 00:02:05,780
So dishdasha domain and it needs to be something like something that surge that as age.

26
00:02:08,470 --> 00:02:13,060
And this is something that you need to decide for yourself and of course, first to make sure that this

27
00:02:13,060 --> 00:02:19,600
isn't taken anywhere and at the same time to make sure that this is unique enough so that nobody else

28
00:02:19,780 --> 00:02:20,990
has taken it already.

29
00:02:21,010 --> 00:02:23,420
Otherwise, of course, you will not be able to register it.

30
00:02:23,710 --> 00:02:33,220
I have used this domain name generator just to find something unique or a bit more unusual, and I'll

31
00:02:33,220 --> 00:02:35,440
be using the zone for my domain name.

32
00:02:36,040 --> 00:02:41,740
But this is just because I don't have any better idea what to name my domain like, but feel free to

33
00:02:41,740 --> 00:02:43,480
type in whatever you feel like.

34
00:02:44,950 --> 00:02:46,930
So my domain will be installed on.

35
00:02:50,660 --> 00:02:58,490
We don't need to specify any tokens because we already have them as environment variables, so search

36
00:02:58,490 --> 00:03:04,380
will look for the variables that we have to find and will automatically use them to authenticate ourselves.

37
00:03:07,620 --> 00:03:10,410
So that's about it, let's save it and give it a go.

38
00:03:13,600 --> 00:03:19,690
There's one more thing we need to do now, we have to find a stage called deploy, but we haven't assigned

39
00:03:19,690 --> 00:03:22,020
the job deployed to search to that one.

40
00:03:22,300 --> 00:03:29,440
So by default, if you don't specify a stage for your job, then it will automatically go to the test

41
00:03:29,440 --> 00:03:29,930
stage.

42
00:03:30,280 --> 00:03:33,060
And this is something that we don't want at this step.

43
00:03:33,070 --> 00:03:35,090
We first want to run our tests and then deploy.

44
00:03:35,110 --> 00:03:37,260
So let's do that small change as well.

45
00:03:38,830 --> 00:03:39,610
The stage.

46
00:03:48,020 --> 00:03:55,910
And now our pipeline has three stages, a build stage, the test stage, which runs in parallel, and

47
00:03:55,910 --> 00:04:03,130
only when both jobs with test have been executed and are successful will the deploy stage be executed.

48
00:04:03,140 --> 00:04:09,320
So if any of the stages here fail, then the deploy will not be executed.

49
00:04:11,680 --> 00:04:17,260
So it seems now that the pipeline has succeeded and let's look at the final stage to see how the logs

50
00:04:17,260 --> 00:04:17,769
look like.

51
00:04:19,149 --> 00:04:25,690
And you will see here, there's nothing very special, we have installed search and wit this command

52
00:04:25,690 --> 00:04:26,290
surge.

53
00:04:26,340 --> 00:04:32,590
This project was specifying the project and then with this domain, we are specifying the domain and

54
00:04:32,770 --> 00:04:33,970
we are logging in.

55
00:04:34,480 --> 00:04:40,210
And yes, success published in The Zone that Sociedad, that is.

56
00:04:40,870 --> 00:04:43,390
And of course, in your case, it will be a different domain name.

57
00:04:43,630 --> 00:04:45,880
So let's open this in the browser and see how it looks like.

58
00:04:49,920 --> 00:04:57,390
So this is the website automatically being published using search as H and all done automatically through

59
00:04:57,390 --> 00:04:58,200
catalepsy.

