zola/docs/content/documentation/deployment/vercel.md

37 lines
1.1 KiB
Markdown
Raw Normal View History

2020-07-19 11:56:32 +00:00
+++
title = "Vercel"
2020-07-22 16:40:43 +00:00
weight = 50
2020-07-19 11:56:32 +00:00
+++
2020-07-22 16:40:43 +00:00
Vercel (previously zeit) is similar to Netlify, making deployment of sites easy.
2020-07-19 11:56:32 +00:00
The sites are hosted by Vercel and automatically deployed whenever we push a
commit to our selected production branch (e.g, master).
2020-07-22 16:40:43 +00:00
If you don't have an account with Vercel, you can sign up [here](https://vercel.com/signup).
2020-07-19 11:56:32 +00:00
## Automatic deploys
Once you sign up you can import your site from a Git provider (Github, GitLab or Bitbucket).
2020-07-22 16:40:43 +00:00
After the import, you can set the settings for your project.
2020-07-19 11:56:32 +00:00
2020-07-22 16:40:43 +00:00
- Choose Framework Preset as **Other**
- Build command as `zola build` and make sure toggle on Override switch.
- By default Vercel chooses output directory as `public`, if you use a different directory then specify output directory.
- To add your own domain, go to domain setting in left and add it there.
2020-07-19 11:56:32 +00:00
2020-07-22 16:40:43 +00:00
All we have to is include a `vercel.json` in our project's root directory by
specifying the `ZOLA_VERSION` we want to use to deploy the site.
2020-07-19 11:56:32 +00:00
```json
2020-07-19 11:56:32 +00:00
{
"build": {
"env": {
"ZOLA_VERSION": "0.13.0"
2020-07-19 11:56:32 +00:00
}
}
}
```
2020-07-22 16:40:43 +00:00
And your site should now be up and running.