mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 03:12:35 +02:00
docs: add Render hosting guide (#1615)
* Add Render deployment guide * Add guide for Docusaurus 2 * Update guide for v2
This commit is contained in:
parent
83e8e440fa
commit
ee2050d612
2 changed files with 47 additions and 1 deletions
|
@ -27,6 +27,7 @@ At this point, you can grab all of the files inside the `website/build` director
|
||||||
|
|
||||||
* [GitHub Pages](#using-github-pages)
|
* [GitHub Pages](#using-github-pages)
|
||||||
* [Netlify](#hosting-on-netlify)
|
* [Netlify](#hosting-on-netlify)
|
||||||
|
* [Render](#hosting-on-render)
|
||||||
|
|
||||||
### Using GitHub Pages
|
### Using GitHub Pages
|
||||||
|
|
||||||
|
@ -233,6 +234,33 @@ Steps to configure your Docusaurus-powered site on Netlify.
|
||||||
|
|
||||||
You can also configure Netlify to rebuild on every commit to your repository, or only `master` branch commits.
|
You can also configure Netlify to rebuild on every commit to your repository, or only `master` branch commits.
|
||||||
|
|
||||||
|
### Hosting on Render
|
||||||
|
|
||||||
|
Render offers free [static site](https://render.com/docs/static-sites) hosting with fully managed SSL, custom domains, a global CDN and continuous auto deploys from your Git repo. Deploy your app in just a few minutes by following these steps.
|
||||||
|
|
||||||
|
1. Create a new **Web Service** on Render, and give Render's GitHub app permission to access your Docusaurus repo.
|
||||||
|
|
||||||
|
2. Select the branch to deploy. The default is `master`.
|
||||||
|
|
||||||
|
2. Enter the following values during creation.
|
||||||
|
|
||||||
|
| Field | Value |
|
||||||
|
| ------- | ----- |
|
||||||
|
| **Environment** | `Static Site` |
|
||||||
|
| **Build Command** | `cd website; yarn install; yarn build` |
|
||||||
|
| **Publish Directory** | `website/build/<projectName>` |
|
||||||
|
|
||||||
|
`projectName` is the value you defined in your `siteConfig.js`.
|
||||||
|
|
||||||
|
```javascript{7}
|
||||||
|
const siteConfig = {
|
||||||
|
// ...
|
||||||
|
projectName: 'your-project-name',
|
||||||
|
// ...
|
||||||
|
```
|
||||||
|
|
||||||
|
That's it! Your app will be live on your Render URL as soon as the build finishes.
|
||||||
|
|
||||||
### Publishing to GitHub Enterprise
|
### Publishing to GitHub Enterprise
|
||||||
|
|
||||||
GitHub enterprise installations should work in the same manner as github.com; you only need to identify the organization's GitHub Enterprise host.
|
GitHub enterprise installations should work in the same manner as github.com; you only need to identify the organization's GitHub Enterprise host.
|
||||||
|
|
|
@ -11,7 +11,7 @@ npm build
|
||||||
|
|
||||||
Once it finishes, you should see the production build under the `build/` directory.
|
Once it finishes, you should see the production build under the `build/` directory.
|
||||||
|
|
||||||
You can deploy your site to static site hosting services such as [GitHub Pages](https://pages.github.com/), [Netlify](https://www.netlify.com/). Docusaurus sites are server rendered so they work without JavaScript too!
|
You can deploy your site to static site hosting services such as [GitHub Pages](https://pages.github.com/), [Render](https://render.com/static-sites), and [Netlify](https://www.netlify.com/). Docusaurus sites are server rendered so they work without JavaScript too!
|
||||||
|
|
||||||
## Deploying to GitHub Pages
|
## Deploying to GitHub Pages
|
||||||
|
|
||||||
|
@ -76,6 +76,24 @@ References:
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## Deploying to Render
|
||||||
|
|
||||||
|
Render offers [free static site hosting](https://render.com/docs/static-sites) with fully managed SSL, custom domains, a global CDN and continuous auto deploys from your Git repo. Deploy your app in just a few minutes by following these steps.
|
||||||
|
|
||||||
|
1. Create a new **Web Service** on Render, and give Render permission to access your Docusaurus repo.
|
||||||
|
|
||||||
|
2. Select the branch to deploy. The default is `master`.
|
||||||
|
|
||||||
|
2. Enter the following values during creation.
|
||||||
|
|
||||||
|
| Field | Value |
|
||||||
|
| ------- | ----- |
|
||||||
|
| **Environment** | `Static Site` |
|
||||||
|
| **Build Command** | `yarn build` |
|
||||||
|
| **Publish Directory** | `build` |
|
||||||
|
|
||||||
|
That's it! Your app will be live on your Render URL as soon as the build finishes.
|
||||||
|
|
||||||
## Deployment with Netlify
|
## Deployment with Netlify
|
||||||
|
|
||||||
_This section is a work in progress. [Welcoming PRs](https://github.com/facebook/docusaurus/issues/1640)._
|
_This section is a work in progress. [Welcoming PRs](https://github.com/facebook/docusaurus/issues/1640)._
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue