Skip to content

Commit

Permalink
docs: Update deployment documentation for Vercel (#6691)
Browse files Browse the repository at this point in the history
  • Loading branch information
leerob authored Jan 31, 2022
1 parent a4895ed commit 7418fe5
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions docs/guide/static-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,30 @@ You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-do

## Vercel

To deploy your Vite app with a [Vercel for Git](https://vercel.com/docs/git), make sure it has been pushed to a Git repository.
### Vercel CLI

Go to https://vercel.com/import/git and import the project into Vercel using your Git of choice (GitHub, GitLab or BitBucket). Follow the wizard to select the project root with the project's `package.json` and override the build step using `npm run build` and the output dir to be `./dist`
1. Install the [Vercel CLI](https://vercel.com/cli) and run `vercel` to deploy.
2. Vercel will detect that you are using Vite and will enable the correct settings for your deployment.
3. Your application is deployed! (e.g. [vite-vue-template.vercel.app](https://vite-vue-template.vercel.app/))

![Override Vercel Configuration](../images/vercel-configuration.png)
```bash
$ npm i -g vercel
$ vercel init vite
Vercel CLI
> Success! Initialized "vite" example in ~/your-folder.
- To deploy, `cd vite` and run `vercel`.
```

### Vercel for Git

1. Push your code to your git repository (GitHub, GitLab, BitBucket).
2. [Import your Vite project](https://vercel.com/new) into Vercel.
3. Vercel will detect that you are using Vite and will enable the correct settings for your deployment.
4. Your application is deployed! (e.g. [vite-vue-template.vercel.app](https://vite-vue-template.vercel.app/))

After your project has been imported, all subsequent pushes to branches will generate Preview Deployments, and all changes made to the Production Branch (commonly "main") will result in a Production Deployment.
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).

Once deployed, you will get a URL to see your app live, such as the following: https://vite.vercel.app
Learn more about Vercel’s [Git Integration](https://vercel.com/docs/concepts/git).

## Azure Static Web Apps

Expand Down

0 comments on commit 7418fe5

Please sign in to comment.