Skip to content

Deploy Documentation Site — Laundry Management System

Document Information

Field Value
Project Laundry Management System
Version 1.0
Platform Cloudflare Pages
Document Type Deployment Guide

Overview

The documentation for the Laundry Management System is built with MkDocs + Material for MkDocs and hosted on Cloudflare Pages for free. The site is private — only team members can access it via Cloudflare Access.


One-Time Setup

Step 1: Create a Cloudflare Account

  1. Go to cloudflare.com.
  2. Sign up for a free account.
  3. Verify your email.

Step 2: Create a Cloudflare Pages Project

  1. In the Cloudflare dashboard, go to Workers & PagesPages.
  2. Click Connect to Git.
  3. Select your GitHub organization (unitydevs-ly).
  4. Select the Laundry-system repository.
  5. Click Begin setup.

Step 3: Configure Build Settings

Setting Value
Production branch main
Build command pip install mkdocs mkdocs-material && mkdocs build
Build output directory site

Click Save and Deploy. Cloudflare will build and deploy the site.

Step 4: Get API Token and Account ID (for GitHub Actions)

  1. API Token:
  2. Go to My ProfileAPI Tokens.
  3. Click Create Token.
  4. Use the "Edit Cloudflare Workers" template.
  5. Account Resources: select your account.
  6. Zone Resources: select your zone (or all zones).
  7. Click Continue to summaryCreate Token.
  8. Copy the token. You won't see it again.

  9. Account ID:

  10. In the Cloudflare dashboard, scroll down on any page.
  11. The Account ID is displayed in the right sidebar under API.
  12. Copy it.

Step 5: Add Secrets to GitHub

  1. Go to https://github.com/unitydevs-ly/Laundry-system/settings/secrets/actions.
  2. Click New repository secret.
  3. Add these two secrets:
Name Value
CLOUDFLARE_API_TOKEN The API token from Step 4
CLOUDFLARE_ACCOUNT_ID The Account ID from Step 4

Step 6: Secure the Site (Optional — Team Access Only)

To restrict the docs site to team members only:

  1. In Cloudflare dashboard, go to Zero TrustAccessApplications.
  2. Click Add an applicationSelf-hosted.
  3. Application name: Laundry Docs.
  4. Application domain: laundry-docs.pages.dev (or your custom domain).
  5. Click Next.
  6. Add a policy:
  7. Policy name: Team Access
  8. Action: Allow
  9. Include → Selector: Emails ending in → Value: @yourcompany.com
  10. Or: Selector: Login Methods → GitHub / Google
  11. Click NextAdd application.

Now only team members who authenticate via email or GitHub can access the docs.


How It Works (Automated)

After the one-time setup, every push to main that changes files in docs/ or mkdocs.yml triggers:

GitHub Push → GitHub Actions (docs.yml) → mkdocs build → Cloudflare Pages deploy

No manual steps. The site updates automatically within 1-2 minutes.


Preview Deploys

Cloudflare Pages automatically creates a preview URL for every Pull Request that changes docs. This lets reviewers see the rendered documentation before merging.

Preview URLs follow the format: https://<branch-name>.laundry-docs.pages.dev


Local Development

To preview the docs locally before pushing:

# Install MkDocs
pip install mkdocs mkdocs-material

# Serve locally (live reload)
mkdocs serve

# Open http://localhost:8000

Customizing the Site

File Purpose
mkdocs.yml Theme, navigation, plugins, extensions
docs/index.md Landing page
docs/*.md All documentation files

Alternatives Considered

Platform Reason Not Chosen
GitHub Pages Free only for public repos. Our repo is private.
Netlify Free password protection is one shared password — not per-user authentication.
Vercel Free tier is for personal accounts only. Requires Pro plan ($20/user) for organizations.

Revision History

Date Version Author Changes
2026-05-10 1.0 DevOps Lead Initial docs deployment guide