Cloudflare Pages supports deploying static sites without Git integration through Direct Upload methods.

Deployment Methods

The official Cloudflare CLI tool for deployments:

Terminal window
# Install Wrangler
npm install -g wrangler
# Deploy directory
wrangler pages deploy <BUILD_OUTPUT_DIR> --project-name=<PROJECT_NAME>
# For Lattice
cd ~/.lattice
bun run build
wrangler pages deploy dist --project-name=lattice

Features:

  • Command-line automation
  • CI/CD integration support
  • Production and preview deployments
  • Branch-based environments

2. Drag-and-Drop Upload

Manual upload through Cloudflare dashboard:

  1. Navigate to Workers & Pages > Create application > Pages
  2. Choose “Upload assets”
  3. Drag your build output directory or zip file
  4. Cloudflare processes and deploys

Use cases:

  • Quick testing
  • One-off deployments
  • Non-technical team members

Important Limitations

Cannot Switch to Git Later

Once you create a project with Direct Upload, you cannot switch it to Git integration. This is a permanent choice.

Workaround: Create a new project if you need Git integration later.

No Automatic Deployments

Direct Upload requires manual deployment commands or CI/CD setup:

# Example GitHub Actions workflow
name: Deploy to Cloudflare Pages
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run build
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy dist --project-name=lattice

Best Practices

  1. Use Wrangler for automation - More reliable than drag-and-drop for regular deployments
  2. Set up CI/CD - Automate deployments on content changes
  3. Preview deployments - Test changes before production:
    Terminal window
    wrangler pages deploy dist --project-name=lattice --branch=preview
  4. Version control build artifacts - Or trigger builds in CI/CD

Lattice Deployment Workflow

For deploying Lattice site to lattice.uptownhr.com:

Terminal window
# 1. Sync docs to graph
lattice sync
# 2. Build site (includes Pagefind search index)
lattice site --build
# 3. Deploy to Cloudflare Pages
cd ~/.lattice
wrangler pages deploy dist --project-name=lattice

Resources