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¶
- Go to cloudflare.com.
- Sign up for a free account.
- Verify your email.
Step 2: Create a Cloudflare Pages Project¶
- In the Cloudflare dashboard, go to Workers & Pages → Pages.
- Click Connect to Git.
- Select your GitHub organization (
unitydevs-ly). - Select the
Laundry-systemrepository. - 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)¶
- API Token:
- Go to My Profile → API Tokens.
- Click Create Token.
- Use the "Edit Cloudflare Workers" template.
- Account Resources: select your account.
- Zone Resources: select your zone (or all zones).
- Click Continue to summary → Create Token.
-
Copy the token. You won't see it again.
-
Account ID:
- In the Cloudflare dashboard, scroll down on any page.
- The Account ID is displayed in the right sidebar under API.
- Copy it.
Step 5: Add Secrets to GitHub¶
- Go to
https://github.com/unitydevs-ly/Laundry-system/settings/secrets/actions. - Click New repository secret.
- 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:
- In Cloudflare dashboard, go to Zero Trust → Access → Applications.
- Click Add an application → Self-hosted.
- Application name:
Laundry Docs. - Application domain:
laundry-docs.pages.dev(or your custom domain). - Click Next.
- Add a policy:
- Policy name:
Team Access - Action:
Allow - Include → Selector:
Emails ending in→ Value:@yourcompany.com - Or: Selector:
Login Methods→ GitHub / Google - Click Next → Add 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:
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 |