docs: Update Vercel deployment documentation. (#3000)

This commit is contained in:
Lee Robinson 2022-02-07 04:22:09 -06:00 committed by GitHub
parent dcae6e276b
commit 619f9dd3e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ icon: LogoVercel
# Vercel
How to deploy Nuxt to Vercel.
Nuxt on Vercel supports server-rendered pages and API routes.
::list
@ -13,13 +13,27 @@ How to deploy Nuxt to Vercel.
- No configuration required
::
## Setup
## CLI
By default, [Vercel](https://vercel.com) will run your `build` script in the `package.json` and automatically detect the built entry point within `.vercel_build_output/`.
1. Install the [Vercel CLI](https://vercel.com/cli).
2. Vercel will detect that you are using Nuxt and will enable the correct settings for your deployment.
3. Your application is deployed! (e.g. [nuxt.vercel.app](https://nuxt.vercel.app/))
## Deployment
```bash
$ npm i -g vercel
$ npx nuxi init -t v3-vercel
$ vercel
Just push to your git repository [as you would normally do for Vercel](https://vercel.com/docs/git).
## Git
1. Push your code to your git repository (GitHub, GitLab, BitBucket).
2. [Import your project](https://vercel.com/new) into Vercel.
3. Vercel will detect that you are using Nuxt and will enable the correct settings for your deployment.
4. Your application is deployed! (e.g. [nuxt.vercel.app](https://nuxt.vercel.app/))
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).
Learn more about Vercels [Git Integration](https://vercel.com/docs/concepts/git).
## More information
@ -27,4 +41,4 @@ See [more information on the node preset](/docs/deployment/presets/node) for ful
## Demo
A live demo is available at <https://nitro-demo.vercel.app/>.
A live demo is available at <https://nuxt.vercel.app>.