Skip to main content

Hosting Deploy - Make Your Website Live

Your Docusar project is a static site built with Docusaurus. To make it live on the internet, you need to deploy it to a hosting provider. In this guide, you will learn how to deploy from zero - from registration to a live site.

Docusar works perfectly with three modern free hosting providers: Vercel, Netlify, and Cloudflare Pages.

Prerequisites​

Before you start, make sure you have:

  1. Your Docusar project already pushed to GitHub (see the previous article: GitHub Push)
  2. A GitHub account
  3. A Gmail or email for registration

Step 1: Register on a Hosting Provider​

You only need one provider. Pick one. Vercel is the easiest and fastest for Docusaurus.

Option A - Register on Vercel (Recommended)

  1. Go to https://vercel.com
  2. Click Sign Up on the top right
  3. Click Continue with GitHub - This is important. Do not use email. Use GitHub so your repo auto-connects.
  4. GitHub will ask you to authorize Vercel. Click Authorize Vercel
  5. You will be redirected to the Vercel dashboard. Registration done.

Option B - Register on Netlify

  1. Go to https://netlify.com
  2. Click Sign up
  3. Click Sign up with GitHub
  4. Authorize Netlify to access your GitHub
  5. You will enter the Netlify dashboard.

Option C - Register on Cloudflare Pages

  1. Go to https://pages.cloudflare.com
  2. Click Sign up for free or Log in
  3. Create an account with your email
  4. After login, go to Workers & Pages > Create application > Pages
  5. Click Connect to Git and connect your GitHub account

Step 2: Create a New Project​

After you register and log in to the dashboard:

On Vercel:

  1. In the dashboard, click Add New... > Project
  2. You will see a list of your GitHub repositories. Find your Docusar repo.
  3. Click Import next to your repo name
  4. If you do not see your repo, click Adjust GitHub App Permissions and give Vercel access to all repos

On Netlify:

  1. In the dashboard, click Add new site > Import an existing project
  2. Click Deploy with GitHub
  3. Select your Docusar repository from the list

On Cloudflare Pages:

  1. Click Create a project > Connect to Git
  2. Select your GitHub account and your Docusar repository
  3. Click Begin setup

Step 3: Configure Build Settings​

This is the most important part. The hosting needs to know how to build Docusaurus.

The system usually auto-detects, but check these settings:

  • Framework Preset: Select Docusaurus
  • Build Command: npm run build or yarn build
  • Output Directory: build
  • Install Command: npm install or yarn install
  • Root Directory: Leave empty (or ./ if required)

Important: Do NOT change the Output Directory to public or dist. Docusaurus output is always build.

Leave Environment Variables empty unless you use a custom API.

Step 4: Deploy​

  1. Click the Deploy button
  2. The hosting will start building your site. You will see build logs
  3. Wait 1-3 minutes. The process includes: installing packages > building Docusaurus > uploading files
  4. If the build is successful, you will see Congratulations and a live URL

Your live URLs will be:

  • Vercel: https://your-project-name.vercel.app
  • Netlify: https://your-project-name.netlify.app
  • Cloudflare: https://your-project-name.pages.dev

Click the URL to open your live website. Your Docusar site is now live.

Step 5: Auto Deploy and Custom Domain​

Auto Deploy: From now on, you do not need to deploy manually. Every time you push new changes to GitHub using git push, Vercel / Netlify / Cloudflare will auto-detect and auto-deploy your new version in 1-2 minutes.

How to Add a Custom Domain: If you have your own domain like mydocs.com:

  • On Vercel: Go to Project > Settings > Domains > Add your domain > Follow the DNS instructions
  • On Netlify: Go to Domain settings > Add custom domain
  • On Cloudflare: Go to the Custom domains tab > Set up a custom domain

Update your domain DNS with the provided CNAME or A record. Your site will be live on your custom domain within 5-30 minutes.

If the build fails, check the build logs for errors. The most common error is a missing build folder or a wrong build command.