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: docs/2.deploy/20.providers/vercel.md
+10-14Lines changed: 10 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,27 +12,23 @@ Integration with this provider is possible with [zero configuration](/deploy/#ze
12
12
13
13
## Deploy using git
14
14
15
-
1. Push your code to your git repository (GitHub, GitLab, Bitbucket).
16
-
2.[Import your project](https://vercel.com/new) into Vercel.
17
-
3. Vercel will detect that you are using Nitro and will enable the correct settings for your deployment.
18
-
4. Your application is deployed!
15
+
16
+
- Push your code to your git repository (GitHub, GitLab, Bitbucket).
17
+
-[Import your project](https://vercel.com/new) into Vercel.
18
+
- Vercel will detect that you are using Nitro and will enable the correct settings for your deployment.
19
+
- Your application is deployed!
20
+
19
21
20
22
After your project has been imported and deployed, all subsequent pushes to branches will generate [Preview Deployments](https://vercel.com/docs/concepts/deployments/environments#preview), and all changes made to the Production Branch (commonly “main”) will result in a [Production Deployment](https://vercel.com/docs/concepts/deployments/environments#production).
21
23
22
24
Learn more about Vercel’s [Git Integration](https://vercel.com/docs/concepts/git).
23
25
24
-
## Monorepo
26
+
## Monorepo support
25
27
26
28
Monorepos are supported by Vercel. However a custom "[Root Directory](https://vercel.com/docs/deployments/configure-a-build#root-directory)" must be specified in "Project Settings > General" tab. Make sure that "Include source files outside of the Root Directory" is checked.
27
29
28
30
Examples of values for "Root Directory": `apps/web` or `packages/app`.
29
31
30
-
## API routes
31
-
32
-
Nitro `/api` directory isn't compatible with Vercel. Instead, you should use:
33
-
34
-
-`server/routes/api/` for standalone usage
35
-
36
32
## Custom build output configuration
37
33
38
34
You can provide additional [build output configuration](https://vercel.com/docs/build-output-api/v3) using `vercel.config` key inside `nitro.config`. It will be merged with built-in auto-generated config.
@@ -43,10 +39,10 @@ On-demand revalidation allows you to purge the cache for an ISR route whenever y
43
39
44
40
To revalidate a page on demand:
45
41
46
-
1. Create an Environment Variable which will store a revalidation secret
42
+
- Create an Environment Variable which will store a revalidation secret
47
43
- You can use the command `openssl rand -base64 32` or [Generate a Secret](https://generate-secret.vercel.app/32) to generate a random value.
48
44
49
-
2. Update your configuration:
45
+
- Update your configuration:
50
46
51
47
::code-group
52
48
@@ -74,7 +70,7 @@ To revalidate a page on demand:
74
70
75
71
::
76
72
77
-
3.Totrigger"On-Demand Incremental Static Regeneration (ISR)"andrevalidateapathtoaPrerenderFunction, makeaGETorHEADrequesttothatpathwithaheaderofx-prerender-revalidate: `bypassToken`. WhenthatPrerenderFunctionendpointisaccessedwiththisheaderset, thecachewillberevalidated. Thenextrequesttothatfunction should return a fresh response.
73
+
-Totrigger"On-Demand Incremental Static Regeneration (ISR)"andrevalidateapathtoaPrerenderFunction, makeaGETorHEADrequesttothatpathwithaheaderofx-prerender-revalidate: `bypassToken`. WhenthatPrerenderFunctionendpointisaccessedwiththisheaderset, thecachewillberevalidated. Thenextrequesttothatfunction should return a fresh response.
0 commit comments