Cloudflare Pages Direct Upload
Cloudflare Pages supports deploying static sites without Git integration through Direct Upload methods.
Deployment Methods
1. Wrangler CLI (Recommended)
The official Cloudflare CLI tool for deployments:
# Install Wranglernpm install -g wrangler
# Deploy directorywrangler pages deploy <BUILD_OUTPUT_DIR> --project-name=<PROJECT_NAME>
# For Latticecd ~/.latticebun run buildwrangler pages deploy dist --project-name=latticeFeatures:
- Command-line automation
- CI/CD integration support
- Production and preview deployments
- Branch-based environments
2. Drag-and-Drop Upload
Manual upload through Cloudflare dashboard:
- Navigate to Workers & Pages > Create application > Pages
- Choose “Upload assets”
- Drag your build output directory or zip file
- 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 workflowname: Deploy to Cloudflare Pageson: 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=latticeBest Practices
- Use Wrangler for automation - More reliable than drag-and-drop for regular deployments
- Set up CI/CD - Automate deployments on content changes
- Preview deployments - Test changes before production:
Terminal window wrangler pages deploy dist --project-name=lattice --branch=preview - Version control build artifacts - Or trigger builds in CI/CD
Lattice Deployment Workflow
For deploying Lattice site to lattice.uptownhr.com:
# 1. Sync docs to graphlattice sync
# 2. Build site (includes Pagefind search index)lattice site --build
# 3. Deploy to Cloudflare Pagescd ~/.latticewrangler pages deploy dist --project-name=lattice