diff --git a/docs/en/next/publishing.html b/docs/en/next/publishing.html index 59b359e85f..14c0f775b4 100644 --- a/docs/en/next/publishing.html +++ b/docs/en/next/publishing.html @@ -103,7 +103,7 @@

Using ZEIT Now

Deploying your Docusaurus project to ZEIT Now will provide you with various benefits in the areas of performance and ease of use.

-

Most importantly, however, deploying a Docusaurus project only takes a couple seconds:

+

Most importantly, however, deploying a Docusaurus project only takes a couple of seconds:

  1. First, install their command-line interface:
@@ -116,10 +116,10 @@

That's all. Your docs will automatically be deployed.

-

Note that the directory structure Now supports is slightly different from the default directory structure of a Docusaurus project - The docs directory has to be within the website directory, ideally following the directory structure in this example. You will also have to specify a customDocsPath value in siteConfig.js. Take a look at the the now-examples repository for a Docusaurus project.

+

Note that the directory structure Now supports is slightly different from the default directory structure of a Docusaurus project - The docs directory has to be within the website directory, ideally following the directory structure in this example. You will also have to specify a customDocsPath value in siteConfig.js. Take a look at the now-examples repository for a Docusaurus project.

Using GitHub Pages

-

Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: GitHub Pages.

+

Docusaurus was designed to work well with one of the most popular hosting solutions for open source projects: GitHub Pages.

Deploying to GitHub Pages

  1. Docusaurus supports deploying as project pages or user/organization pages, your code repository does not even need to be public.
  2. @@ -137,7 +137,7 @@ organizationNameThe GitHub user or organization that owns the repository. If you are the owner, then it is your GitHub username. In the case of Docusaurus, that would be the "facebook" GitHub organization. -projectNameThe name of the GitHub repository for your project. For example, the source code for Docusaurus is hosted at https://github.com/facebook/docusaurus, so our project name in this case would be "docusaurus". +projectNameThe name of the GitHub repository for your project. For example, the source code for Docusaurus is hosted at https://github.com/facebook/docusaurus, so our project name, in this case, would be "docusaurus". urlYour website's URL. For projects hosted on GitHub pages, this will be "https://username.github.io" baseUrlBase URL for your project. For projects hosted on GitHub pages, it follows the format "/projectName/". For https://github.com/facebook/docusaurus, baseUrl is /docusaurus/. @@ -164,7 +164,7 @@ NameDescription -GIT_USERThe username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username. The specified GIT_USER must have push access to the repository specified in the combination of organizationName and projectName. +GIT_USERThe username for a GitHub account that has to commit access to this repo. For your repositories, this will usually be your own GitHub username. The specified GIT_USER must have push access to the repository specified in the combination of organizationName and projectName.

    To run the script directly from the command-line, you can use the following, filling in the parameter values as appropriate.

    @@ -193,7 +193,7 @@

    You can run the command above any time you update the docs and wish to deploy the changes to your site. Running the script manually may be fine for sites where the documentation rarely changes and it is not too much of an inconvenience to remember to manually deploy changes.

    However, you can automate the publishing process with continuous integration (CI).

    Automating Deployments Using Continuous Integration

    -

    Continuous integration (CI) services are typically used to perform routine tasks whenever new commits are checked in to source control. These tasks can be any combination of running unit tests and integration tests, automating builds, publishing packages to NPM, and yes, deploying changes to your website. All you need to do to automate deployment of your website is to invoke the publish-gh-pages script whenever your docs get updated. In the following section, we'll be covering how to do just that using CircleCI, a popular continuous integration service provider.

    +

    Continuous integration (CI) services are typically used to perform routine tasks whenever new commits are checked in to source control. These tasks can be any combination of running unit tests and integration tests, automating builds, publishing packages to NPM, and yes, deploying changes to your website. All you need to do to automate the deployment of your website is to invoke the publish-gh-pages script whenever your docs get updated. In the following section, we'll be covering how to do just that using CircleCI, a popular continuous integration service provider.

    Using CircleCI 2.0

    If you haven't done so already, you can setup CircleCI for your open source project. Afterwards, in order to enable automatic deployment of your site and documentation via CircleCI, just configure Circle to run the publish-gh-pages script as part of the deployment step. You can follow the steps below to get that setup.

      @@ -205,7 +205,7 @@
    1. Create a .circleci directory and create a config.yml under that directory.
    2. Copy the text below into .circleci/config.yml.
    -
    # If you only want circle to run on direct commits to master, you can uncomment this out
    +
    # If you only want the circle to run on direct commits to master, you can uncomment this out
     # and uncomment the filters: *filter-only-master down below too
     #
     # aliases:
    @@ -315,7 +315,7 @@
     

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 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.

+

Render offers free static site hosting with fully managed SSL, custom domains, a global CDN and continuous auto deploy 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.

  3. @@ -349,7 +349,7 @@

    Alter your siteConfig.js to add a property 'githubHost' which represents the GitHub Enterprise hostname. Alternatively, set an environment variable GITHUB_HOST when executing the publish command.

    -
    Last updated on 2/21/2020 by jartuso