Skip to content

Deploying a Website: Netlify Drop, Cloudflare Pages, GitHub Pages

Summary

Deploying a website involves publishing a ready-to-go site to the internet. For an MkDocs site, this means uploading the site/ folder to a hosting service. There are several free methods available.

Before Publishing

Build the site:

mkdocs build

After this, a folder will appear:

D:\ai-wiki\site

This is the folder that needs to be published.

1. Netlify Drop — the simplest method

Suitable if you don't want to deal with Git and the command line.

  1. Open:
https://app.netlify.com/drop
  1. Drag the site folder directly into the browser window.
  2. After a few seconds, you will receive a link of the form:
https://your-site.netlify.app

Pros:

  • No GitHub required;
  • No terminal needed;
  • Quick.

Cons:

  • The folder needs to be manually re-uploaded when the site is updated.

2. Cloudflare Pages — free and fast

Cloudflare Pages can work in two ways.

Option A: File Upload

  1. Go to:
https://dash.cloudflare.com/
  1. Open Workers & Pages.
  2. Click Create → Pages → Upload assets.
  3. Upload the contents of the site folder.
  4. You will receive a link of the form:
https://your-site.pages.dev

Option B: GitHub Integration

Cloudflare Pages can automatically rebuild the site when pushed to GitHub.

Requirements:

  • A repository with the project;
  • Build command: mkdocs build;
  • Output directory: site.

3. GitHub Pages — for those who manage projects in GitHub

GitHub Pages provides free hosting for static sites.

A quick method for MkDocs:

mkdocs gh-deploy

This command will build the site and upload it to the gh-pages branch.

Then, in the repository settings, select:

Settings → Pages → Branch: gh-pages

The site will appear at:

https://username.github.io/repository/

Comparison

Platform GitHub Required Auto-rebuild Complexity
Netlify Drop No No Very low
Cloudflare Pages No Yes with GitHub integration Low
GitHub Pages Yes Yes Medium

What to Choose

  • Just to try out: Netlify Drop.
  • For a nice free URL and speed: Cloudflare Pages.
  • If the project is already in GitHub: GitHub Pages.

See Also